Always qualify literals by type

This commit is contained in:
Matthew Jasper 2020-02-03 20:12:42 +00:00
parent a1912f2e89
commit 0663f25375
2 changed files with 14 additions and 21 deletions

View file

@ -1,5 +1,5 @@
#![feature(no_core, lang_items)]
#![crate_type="rlib"]
#![crate_type = "rlib"]
#![no_core]
pub static STATIC_BOOL: bool = true;
@ -9,7 +9,6 @@ pub static mut STATIC_MUT_BOOL: bool = true;
const CONST_BOOL: bool = true;
pub static CONST_BOOL_REF: &'static bool = &CONST_BOOL;
#[lang = "sized"]
trait Sized {}
@ -19,10 +18,13 @@ trait Copy {}
#[lang = "freeze"]
trait Freeze {}
// No `UnsafeCell`, so everything is `Freeze`.
impl<T: ?Sized> Freeze for T {}
#[lang = "sync"]
trait Sync {}
impl Sync for bool {}
impl Sync for &'static bool {}
#[lang="drop_in_place"]
pub unsafe fn drop_in_place<T: ?Sized>(_: *mut T) { }
#[lang = "drop_in_place"]
pub unsafe fn drop_in_place<T: ?Sized>(_: *mut T) {}