diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-07-11 17:46:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-11 17:46:20 +0200 |
| commit | 4f5ef52c37d009a60b9995511112afde97a30063 (patch) | |
| tree | 2b8fed46e8a36b5ba0cc0e7c08a468e73a899dbb /compiler/rustc_codegen_llvm/src/allocator.rs | |
| parent | 685ba0869366e8efa9894fcb48bef631e2779bab (diff) | |
| parent | b809207dec106b261884daea036fad16eb8a2f89 (diff) | |
| download | rust-4f5ef52c37d009a60b9995511112afde97a30063.tar.gz rust-4f5ef52c37d009a60b9995511112afde97a30063.zip | |
Rollup merge of #113560 - fmease:assoc-tys-in-traits-depr-wc-loc, r=compiler-errors
Lint against misplaced where-clauses on associated types in traits
Extends the scope of the lint `deprecated_where_clause_location` (#89122) from associated types in impls to associated types in any location (impl or trait). This is only relevant for `#![feature(associated_type_defaults)]`. Previously we didn't warn on the following code for example:
```rs
#![feature(associated_type_defaults)]
trait Trait { type Assoc where u32: Copy = (); }
```
Personally I would've preferred to emit a *hard* error here instead of a lint warning since the feature is unstable but unfortunately we are constrained by back compat as associated type defaults won't necessarily trigger the feature-gate error if they are inside of a macro call (since they use a post-expansion feature-gate due to historical reasons, see also #66004).
I've renamed and moved related preexisting tests: 1. They test AST validation passes not the parser & thus shouldn't live in `parser/` (historical reasons?). 2. One test file was named after type aliases even though it tests assoc tys.
`@rustbot` label A-lint
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/allocator.rs')
0 files changed, 0 insertions, 0 deletions
