Skip to content

Commit

Permalink
Merge pull request #183 from laumann/fix-tests
Browse files Browse the repository at this point in the history
Fix tests
  • Loading branch information
Munksgaard authored Aug 21, 2019
2 parents ffdcb7f + 975c96c commit 3cbd33a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ environment:
install:
- curl -sSf -o rustup-init.exe https://win.rustup.rs
- rustup-init.exe --default-host %TARGET% --default-toolchain %CHANNEL% -y
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin;C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin
- gcc --version
- rustc -Vv
- cargo -V

Expand Down
12 changes: 6 additions & 6 deletions test-project/tests/compile-fail/mut-suggestion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ impl S {
}

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

fn main() {
let local = S;
//~^ HELP make this binding mutable
local.mutate(); //~ ERROR cannot borrow immutable local variable
//~| NOTE cannot borrow mutably
//~^ HELP consider changing this to be mutable
local.mutate(); //~ ERROR cannot borrow `local` as mutable
//~| NOTE cannot borrow as mutable
}
6 changes: 3 additions & 3 deletions test-project/tests/compile-fail/trait-bounds-cant-coerce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ trait Foo {
fn dummy(&self) { }
}

fn a(_x: Box<Foo+Send>) {
fn a(_x: Box<dyn Foo+Send>) {
}

fn c(x: Box<Foo+Sync+Send>) {
fn c(x: Box<dyn Foo+Sync+Send>) {
a(x);
}

fn d(x: Box<Foo>) {
fn d(x: Box<dyn Foo>) {
a(x); //~ ERROR mismatched types
//~| expected trait `Foo + std::marker::Send`, found trait `Foo`
//~| expected type `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>`
Expand Down
2 changes: 1 addition & 1 deletion test-project/tests/pretty/macro.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
// pretty-mode:expanded
// pp-exact:macro.pp

macro_rules! square(( $ x : expr ) => { $ x * $ x } ;);
macro_rules! square { ($ x : expr) => { $ x * $ x } ; }

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

0 comments on commit 3cbd33a

Please sign in to comment.