Skip to content

Commit

Permalink
Auto merge of #5621 - flip1995:rustup, r=phansch
Browse files Browse the repository at this point in the history
Rustup

@oli-obk Do you know, how we can enforce (ui-)tests pass in rust-lang/rust for Clippy? I can open a PR for this, if you tell me what would be necessary for this.

changelog: none
  • Loading branch information
bors committed May 20, 2020
2 parents e214ea8 + 8886251 commit 64b1b8a
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion mini-macro/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_quote, proc_macro_hygiene)]
#![feature(proc_macro_quote)]
#![deny(rust_2018_idioms)]
// FIXME: Remove this attribute once the weird failure is gone.
#![allow(unused_extern_crates)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/auxiliary/proc_macro_derive.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// no-prefer-dynamic

#![crate_type = "proc-macro"]
#![feature(repr128, proc_macro_hygiene, proc_macro_quote)]
#![feature(repr128, proc_macro_quote)]

extern crate proc_macro;

Expand Down
1 change: 0 additions & 1 deletion tests/ui/crashes/ice-3741.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// aux-build:proc_macro_crash.rs
// run-pass

#![feature(proc_macro_hygiene)]
#![warn(clippy::suspicious_else_formatting)]

extern crate proc_macro_crash;
Expand Down
12 changes: 6 additions & 6 deletions tests/ui/ptr_offset_with_cast.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ fn main() {
let offset_isize = 1_isize;

unsafe {
ptr.add(offset_usize);
ptr.offset(offset_isize as isize);
ptr.offset(offset_u8 as isize);
let _ = ptr.add(offset_usize);
let _ = ptr.offset(offset_isize as isize);
let _ = ptr.offset(offset_u8 as isize);

ptr.wrapping_add(offset_usize);
ptr.wrapping_offset(offset_isize as isize);
ptr.wrapping_offset(offset_u8 as isize);
let _ = ptr.wrapping_add(offset_usize);
let _ = ptr.wrapping_offset(offset_isize as isize);
let _ = ptr.wrapping_offset(offset_u8 as isize);
}
}
12 changes: 6 additions & 6 deletions tests/ui/ptr_offset_with_cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ fn main() {
let offset_isize = 1_isize;

unsafe {
ptr.offset(offset_usize as isize);
ptr.offset(offset_isize as isize);
ptr.offset(offset_u8 as isize);
let _ = ptr.offset(offset_usize as isize);
let _ = ptr.offset(offset_isize as isize);
let _ = ptr.offset(offset_u8 as isize);

ptr.wrapping_offset(offset_usize as isize);
ptr.wrapping_offset(offset_isize as isize);
ptr.wrapping_offset(offset_u8 as isize);
let _ = ptr.wrapping_offset(offset_usize as isize);
let _ = ptr.wrapping_offset(offset_isize as isize);
let _ = ptr.wrapping_offset(offset_u8 as isize);
}
}
12 changes: 6 additions & 6 deletions tests/ui/ptr_offset_with_cast.stderr
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
error: use of `offset` with a `usize` casted to an `isize`
--> $DIR/ptr_offset_with_cast.rs:12:9
--> $DIR/ptr_offset_with_cast.rs:12:17
|
LL | ptr.offset(offset_usize as isize);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr.add(offset_usize)`
LL | let _ = ptr.offset(offset_usize as isize);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr.add(offset_usize)`
|
= note: `-D clippy::ptr-offset-with-cast` implied by `-D warnings`

error: use of `wrapping_offset` with a `usize` casted to an `isize`
--> $DIR/ptr_offset_with_cast.rs:16:9
--> $DIR/ptr_offset_with_cast.rs:16:17
|
LL | ptr.wrapping_offset(offset_usize as isize);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr.wrapping_add(offset_usize)`
LL | let _ = ptr.wrapping_offset(offset_usize as isize);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr.wrapping_add(offset_usize)`

error: aborting due to 2 previous errors

0 comments on commit 64b1b8a

Please sign in to comment.