1
Fork 0

rollup merge of #20141: frewsxcv/rfc438

RFC 248? I think you meant RFC 438.

There ain’t an RFC 248, while 438 looks to be what is being referred to:
https://github.com/rust-lang/rfcs/blob/master/text/0438-precedence-of-plus.md

--------------

Chis Morgan has a pretty important documentation fix in #19385 and he hasn't responded in a while to that pull request so I rebased it for him

Closes #19385
This commit is contained in:
Alex Crichton 2014-12-22 12:48:19 -08:00
commit 6938d51122
2 changed files with 4 additions and 4 deletions

View file

@ -798,14 +798,14 @@ fn ast_ty_to_trait_ref<'tcx,AC,RS>(this: &AC,
match ty.node { match ty.node {
ast::TyRptr(None, ref mut_ty) => { ast::TyRptr(None, ref mut_ty) => {
span_note!(this.tcx().sess, ty.span, span_note!(this.tcx().sess, ty.span,
"perhaps you meant `&{}({} +{})`? (per RFC 248)", "perhaps you meant `&{}({} +{})`? (per RFC 438)",
ppaux::mutability_to_string(mut_ty.mutbl), ppaux::mutability_to_string(mut_ty.mutbl),
pprust::ty_to_string(&*mut_ty.ty), pprust::ty_to_string(&*mut_ty.ty),
pprust::bounds_to_string(bounds)); pprust::bounds_to_string(bounds));
} }
ast::TyRptr(Some(ref lt), ref mut_ty) => { ast::TyRptr(Some(ref lt), ref mut_ty) => {
span_note!(this.tcx().sess, ty.span, span_note!(this.tcx().sess, ty.span,
"perhaps you meant `&{} {}({} +{})`? (per RFC 248)", "perhaps you meant `&{} {}({} +{})`? (per RFC 438)",
pprust::lifetime_to_string(lt), pprust::lifetime_to_string(lt),
ppaux::mutability_to_string(mut_ty.mutbl), ppaux::mutability_to_string(mut_ty.mutbl),
pprust::ty_to_string(&*mut_ty.ty), pprust::ty_to_string(&*mut_ty.ty),
@ -814,7 +814,7 @@ fn ast_ty_to_trait_ref<'tcx,AC,RS>(this: &AC,
_ => { _ => {
span_note!(this.tcx().sess, ty.span, span_note!(this.tcx().sess, ty.span,
"perhaps you forgot parentheses? (per RFC 248)"); "perhaps you forgot parentheses? (per RFC 438)");
} }
} }
Err(ErrorReported) Err(ErrorReported)

View file

@ -1456,7 +1456,7 @@ impl<'a> Parser<'a> {
// clauses (i.e., not when parsing something like // clauses (i.e., not when parsing something like
// `FnMut() -> T + Send`, where the `+` is legal). // `FnMut() -> T + Send`, where the `+` is legal).
if self.token == token::BinOp(token::Plus) { if self.token == token::BinOp(token::Plus) {
self.warn("deprecated syntax: `()` are required, see RFC 248 for details"); self.warn("deprecated syntax: `()` are required, see RFC 438 for details");
} }
Return(t) Return(t)