diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-10-05 02:29:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-05 02:29:36 +0200 |
| commit | e032bb7c65d5444a44bda9bd7db5c42b4931b0aa (patch) | |
| tree | 1bdc8c6b98cc7339aaea902f4e75679483e18308 /compiler/rustc_resolve | |
| parent | f1afed541e7676860ec2162eed47a5dcd2043b18 (diff) | |
| parent | 6647eeefb91a2f0e09f7df9f197917d22b01e846 (diff) | |
| download | rust-e032bb7c65d5444a44bda9bd7db5c42b4931b0aa.tar.gz rust-e032bb7c65d5444a44bda9bd7db5c42b4931b0aa.zip | |
Rollup merge of #77439 - varkor:min_const_generics-tests, r=lcnr,estebank
Fix missing diagnostic span for `impl Trait` with const generics, and add various tests for `min_const_generics` and `const_generics` Closes https://github.com/rust-lang/rust/issues/61410. Adds `min_const_generics` tests for: - https://github.com/rust-lang/rust/issues/73727 - https://github.com/rust-lang/rust/issues/72293 - https://github.com/rust-lang/rust/issues/67375 - https://github.com/rust-lang/rust/issues/75153 - https://github.com/rust-lang/rust/issues/71922 - https://github.com/rust-lang/rust/issues/69913 - https://github.com/rust-lang/rust/issues/67945 - https://github.com/rust-lang/rust/issues/69239 Adds `const_generics` tests for: - https://github.com/rust-lang/rust/issues/67375 - https://github.com/rust-lang/rust/issues/75153 - https://github.com/rust-lang/rust/issues/71922 - https://github.com/rust-lang/rust/issues/69913 - https://github.com/rust-lang/rust/issues/67945 - https://github.com/rust-lang/rust/issues/69239 (I only added separate `min_const_generics` and `const_generics` tests if they were handled differently by the two features.) We need to figure out how to deduplicate when `const_generics` is stabilised, but we can discuss that later. For now, we should be checking neither feature breaks, so require regression tests for both. I've given them identical names when I've added both, which should make it easier to spot them later. r? @lcnr
Diffstat (limited to 'compiler/rustc_resolve')
| -rw-r--r-- | compiler/rustc_resolve/src/diagnostics.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index 612bc3e7491..e3cf6d12bd5 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -469,7 +469,7 @@ impl<'a> Resolver<'a> { ResolutionError::ParamInNonTrivialAnonConst { name, is_type } => { let mut err = self.session.struct_span_err( span, - "generic parameters must not be used inside of non trivial constant values", + "generic parameters must not be used inside of non-trivial constant values", ); err.span_label( span, diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 283db1404d0..fe8f5926385 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -218,7 +218,7 @@ enum ResolutionError<'a> { ParamInTyOfConstParam(Symbol), /// constant values inside of type parameter defaults must not depend on generic parameters. ParamInAnonConstInTyDefault(Symbol), - /// generic parameters must not be used inside of non trivial constant values. + /// generic parameters must not be used inside of non-trivial constant values. /// /// This error is only emitted when using `min_const_generics`. ParamInNonTrivialAnonConst { name: Symbol, is_type: bool }, |
