Skip to content

Commit

Permalink
Change some tests to use the shorter comment style
Browse files Browse the repository at this point in the history
  • Loading branch information
ecstatic-morse committed Nov 21, 2019
1 parent 701f6e5 commit ae22938
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,4 @@ fn transmute<'a,'b>(x: &'a u32, y: &'b u32) -> (&'a u32, &'b u32) {
}

#[rustc_error]
fn main() { }
//[ok]~^ ERROR fatal error triggered by #[rustc_error]
//[oneuse]~^^ ERROR fatal error triggered by #[rustc_error]
fn main() { } //[ok,oneuse]~ ERROR fatal error triggered by #[rustc_error]
10 changes: 2 additions & 8 deletions src/test/ui/error-codes/E0161.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,8 @@

fn foo(x: Box<[i32]>) {
box *x;
//[migrate]~^ ERROR E0161
//[nll]~^^ ERROR E0161
//[zflags]~^^^ ERROR E0161
//[edition]~^^^^ ERROR E0161
//[migrateul]~^^^^^ ERROR E0161
//[nllul]~^^^^^^ ERROR E0161
//[zflagsul]~^^^^^^^ ERROR E0161
//[editionul]~^^^^^^^^ ERROR E0161
//[migrate,nll,zflags,edition]~^ ERROR E0161
//[migrateul,nllul,zflagsul,editionul]~^^ ERROR E0161
}

fn main() {}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ struct Foo<T> {
impl<T> Foo<T>
where
T: WithRegion<'_>
//[rust2015]~^ ERROR `'_` cannot be used here
//[rust2018]~^^ ERROR `'_` cannot be used here
//[rust2015,rust2018]~^ ERROR `'_` cannot be used here
{ }

fn main() {}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ trait Foo { }
impl<T> Foo for Vec<T>
where
T: WithType<&u32>
//[rust2015]~^ ERROR `&` without an explicit lifetime name cannot be used here
//[rust2018]~^^ ERROR `&` without an explicit lifetime name cannot be used here
//[rust2015,rust2018]~^ ERROR `&` without an explicit lifetime name cannot be used here
{ }

fn main() {}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ trait Foo { }
impl<T> Foo for Vec<T>
where
T: WithRegion<'_>
//[rust2015]~^ ERROR `'_` cannot be used here
//[rust2018]~^^ ERROR `'_` cannot be used here
//[rust2015,rust2018]~^ ERROR `'_` cannot be used here
{ }

fn main() {}

0 comments on commit ae22938

Please sign in to comment.