Skip to content

Commit 3cbd33a

Browse files
authored
Merge pull request Manishearth#183 from laumann/fix-tests
Fix tests
2 parents ffdcb7f + 975c96c commit 3cbd33a

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ environment:
88
install:
99
- curl -sSf -o rustup-init.exe https://win.rustup.rs
1010
- rustup-init.exe --default-host %TARGET% --default-toolchain %CHANNEL% -y
11-
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
11+
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin;C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin
12+
- gcc --version
1213
- rustc -Vv
1314
- cargo -V
1415

test-project/tests/compile-fail/mut-suggestion.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ impl S {
1717
}
1818

1919
fn func(arg: S) {
20-
//~^ HELP make this binding mutable
21-
arg.mutate(); //~ ERROR cannot borrow immutable argument
22-
//~| NOTE cannot borrow mutably
20+
//~^ HELP consider changing this to be mutable
21+
arg.mutate(); //~ ERROR cannot borrow `arg` as mutable
22+
//~| NOTE cannot borrow as mutable
2323
}
2424

2525
fn main() {
2626
let local = S;
27-
//~^ HELP make this binding mutable
28-
local.mutate(); //~ ERROR cannot borrow immutable local variable
29-
//~| NOTE cannot borrow mutably
27+
//~^ HELP consider changing this to be mutable
28+
local.mutate(); //~ ERROR cannot borrow `local` as mutable
29+
//~| NOTE cannot borrow as mutable
3030
}

test-project/tests/compile-fail/trait-bounds-cant-coerce.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ trait Foo {
1313
fn dummy(&self) { }
1414
}
1515

16-
fn a(_x: Box<Foo+Send>) {
16+
fn a(_x: Box<dyn Foo+Send>) {
1717
}
1818

19-
fn c(x: Box<Foo+Sync+Send>) {
19+
fn c(x: Box<dyn Foo+Sync+Send>) {
2020
a(x);
2121
}
2222

23-
fn d(x: Box<Foo>) {
23+
fn d(x: Box<dyn Foo>) {
2424
a(x); //~ ERROR mismatched types
2525
//~| expected trait `Foo + std::marker::Send`, found trait `Foo`
2626
//~| expected type `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>`

test-project/tests/pretty/macro.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
// pretty-mode:expanded
99
// pp-exact:macro.pp
1010

11-
macro_rules! square(( $ x : expr ) => { $ x * $ x } ;);
11+
macro_rules! square { ($ x : expr) => { $ x * $ x } ; }
1212

1313
fn f() -> i8 { 5 * 5 }

0 commit comments

Comments
 (0)