diff options
| author | Ellen <supbscripter@gmail.com> | 2021-06-01 17:44:49 +0100 |
|---|---|---|
| committer | Ellen <supbscripter@gmail.com> | 2021-06-01 17:44:54 +0100 |
| commit | ba680aa5f25e1584ef6eb54ed45b35ea6d58f9a7 (patch) | |
| tree | 9891e3267d76e2f359bc5e22100a30596de0c3c4 /compiler/rustc_resolve/src | |
| parent | 80af6b091f6a4855be71bba1cd0c1ee9fd2a57a8 (diff) | |
| download | rust-ba680aa5f25e1584ef6eb54ed45b35ea6d58f9a7.tar.gz rust-ba680aa5f25e1584ef6eb54ed45b35ea6d58f9a7.zip | |
Add test for forward declared const param defaults
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/diagnostics.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index a1eafd65d64..03d94f43897 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -450,7 +450,7 @@ impl<'a> Resolver<'a> { err.span_label(shadowed_binding_span, msg); err } - ResolutionError::ForwardDeclaredTyParam => { + ResolutionError::ForwardDeclaredGenericParam => { let mut err = struct_span_err!( self.session, span, diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 5e009d14832..dd80b004596 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -242,7 +242,7 @@ enum ResolutionError<'a> { shadowed_binding_span: Span, }, /// Error E0128: generic parameters with a default cannot use forward-declared identifiers. - ForwardDeclaredTyParam, // FIXME(const_generics_defaults) + ForwardDeclaredGenericParam, /// ERROR E0770: the type of const parameters must not depend on other generic parameters. ParamInTyOfConstParam(Symbol), /// generic parameters must not be used inside const evaluations. @@ -2617,7 +2617,7 @@ impl<'a> Resolver<'a> { let res_error = if rib_ident.name == kw::SelfUpper { ResolutionError::SelfInTyParamDefault } else { - ResolutionError::ForwardDeclaredTyParam + ResolutionError::ForwardDeclaredGenericParam }; self.report_error(span, res_error); } |
