Skip to content

Commit 0d410b8

Browse files
committed
Auto merge of #31492 - alexcrichton:remove-allow-trivial-casts, r=nrc
These were added a long time ago but we long since switched the lint back to allow-by-default, so these annotations shouldn't be necessary.
2 parents 43437dd + 696a1da commit 0d410b8

File tree

6 files changed

+0
-14
lines changed

6 files changed

+0
-14
lines changed

src/libcollections/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
2727
test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))]
2828

29-
#![allow(trivial_casts)]
3029
#![cfg_attr(test, allow(deprecated))] // rand
3130
#![cfg_attr(not(stage0), deny(warnings))]
3231

src/libcore/fmt/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1414,26 +1414,20 @@ impl<T> Pointer for *const T {
14141414
#[stable(feature = "rust1", since = "1.0.0")]
14151415
impl<T> Pointer for *mut T {
14161416
fn fmt(&self, f: &mut Formatter) -> Result {
1417-
// FIXME(#23542) Replace with type ascription.
1418-
#![allow(trivial_casts)]
14191417
Pointer::fmt(&(*self as *const T), f)
14201418
}
14211419
}
14221420

14231421
#[stable(feature = "rust1", since = "1.0.0")]
14241422
impl<'a, T> Pointer for &'a T {
14251423
fn fmt(&self, f: &mut Formatter) -> Result {
1426-
// FIXME(#23542) Replace with type ascription.
1427-
#![allow(trivial_casts)]
14281424
Pointer::fmt(&(*self as *const T), f)
14291425
}
14301426
}
14311427

14321428
#[stable(feature = "rust1", since = "1.0.0")]
14331429
impl<'a, T> Pointer for &'a mut T {
14341430
fn fmt(&self, f: &mut Formatter) -> Result {
1435-
// FIXME(#23542) Replace with type ascription.
1436-
#![allow(trivial_casts)]
14371431
Pointer::fmt(&(&**self as *const T), f)
14381432
}
14391433
}

src/libcore/mem.rs

-2
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,5 @@ pub const POST_DROP_USIZE: usize = POST_DROP_U64 as usize;
578578
#[inline]
579579
#[stable(feature = "rust1", since = "1.0.0")]
580580
pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
581-
// FIXME(#23542) Replace with type ascription.
582-
#![allow(trivial_casts)]
583581
ptr::read(src as *const T as *const U)
584582
}

src/librustc/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343
#![feature(time2)]
4444
#![cfg_attr(test, feature(test))]
4545

46-
#![allow(trivial_casts)]
47-
4846
extern crate arena;
4947
extern crate core;
5048
extern crate flate;

src/librustc_llvm/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#![allow(non_camel_case_types)]
1313
#![allow(non_snake_case)]
1414
#![allow(dead_code)]
15-
#![allow(trivial_casts)]
1615

1716
#![crate_name = "rustc_llvm"]
1817
#![unstable(feature = "rustc_private", issue = "27812")]

src/librustc_trans/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
#![feature(staged_api)]
3838
#![feature(unicode)]
3939

40-
#![allow(trivial_casts)]
41-
4240
extern crate arena;
4341
extern crate flate;
4442
extern crate getopts;

0 commit comments

Comments
 (0)