Add #[fundamental]
annotations into libcore so that Sized
and the
`Fn` traits are considered fundamental, along with `Box` (though that is mostly for show; the real type is `~T` in the compiler).
This commit is contained in:
parent
03d3ba7667
commit
35c261aea0
@ -86,6 +86,7 @@
|
||||
/// See the [module-level documentation](../../std/boxed/index.html) for more.
|
||||
#[lang = "owned_box"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[fundamental]
|
||||
pub struct Box<T>(Unique<T>);
|
||||
|
||||
impl<T> Box<T> {
|
||||
|
@ -71,6 +71,8 @@
|
||||
#![feature(no_std)]
|
||||
#![no_std]
|
||||
#![feature(allocator)]
|
||||
#![feature(custom_attribute)]
|
||||
#![feature(fundamental)]
|
||||
#![feature(lang_items, unsafe_destructor)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(optin_builtin_traits)]
|
||||
|
@ -70,8 +70,10 @@
|
||||
#![feature(unboxed_closures)]
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(fundamental)]
|
||||
#![feature(concat_idents)]
|
||||
#![feature(reflect)]
|
||||
#![feature(custom_attribute)]
|
||||
|
||||
#[macro_use]
|
||||
mod macros;
|
||||
|
@ -49,6 +49,7 @@ impl !Send for Managed { }
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[lang="sized"]
|
||||
#[rustc_on_unimplemented = "`{Self}` does not have a constant size known at compile-time"]
|
||||
#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
|
||||
pub trait Sized : MarkerTrait {
|
||||
// Empty.
|
||||
}
|
||||
|
@ -1117,6 +1117,7 @@ fn deref_mut(&mut self) -> &mut T { *self }
|
||||
#[lang="fn"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_paren_sugar]
|
||||
#[fundamental] // so that regex can rely that `&str: !FnMut`
|
||||
pub trait Fn<Args> : FnMut<Args> {
|
||||
/// This is called when the call operator is used.
|
||||
extern "rust-call" fn call(&self, args: Args) -> Self::Output;
|
||||
@ -1126,6 +1127,7 @@ pub trait Fn<Args> : FnMut<Args> {
|
||||
#[lang="fn_mut"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_paren_sugar]
|
||||
#[fundamental] // so that regex can rely that `&str: !FnMut`
|
||||
pub trait FnMut<Args> : FnOnce<Args> {
|
||||
/// This is called when the call operator is used.
|
||||
extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output;
|
||||
@ -1135,6 +1137,7 @@ pub trait FnMut<Args> : FnOnce<Args> {
|
||||
#[lang="fn_once"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_paren_sugar]
|
||||
#[fundamental] // so that regex can rely that `&str: !FnMut`
|
||||
pub trait FnOnce<Args> {
|
||||
/// The returned type after the call operator is used.
|
||||
type Output;
|
||||
|
Loading…
Reference in New Issue
Block a user