Skip to content

Commit 378e73e

Browse files
committed
Remove support for Self in attributes
1 parent f7c6178 commit 378e73e

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/librustc/traits/error_reporting.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
372372
let generics = self.tcx.generics_of(def_id);
373373
let self_ty = trait_ref.self_ty();
374374
let self_ty_str = self_ty.to_string();
375-
// FIXME: remove once `Self` is accepted by the compiler
376375
flags.push(("_Self".to_string(), Some(self_ty_str.clone())));
377-
flags.push(("Self".to_string(), Some(self_ty_str.clone())));
378376

379377
for param in generics.types.iter() {
380378
let name = param.name.as_str().to_string();

src/libsyntax/parse/parser.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -778,13 +778,7 @@ impl<'a> Parser<'a> {
778778
}
779779

780780
pub fn parse_ident_attr(&mut self) -> PResult<'a, ast::Ident> {
781-
match self.token {
782-
token::Ident(i) if i.name == keywords::SelfType.name() => {
783-
self.bump();
784-
Ok(i)
785-
}
786-
_ => self.parse_ident(),
787-
}
781+
self.parse_ident()
788782
}
789783

790784
fn parse_ident_common(&mut self, recover: bool) -> PResult<'a, ast::Ident> {

0 commit comments

Comments
 (0)