-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Begin extracting frestanding components of libstd #11968
Changes from all commits
e1c700b
5b9371d
4f4354f
6a5d90c
7907068
cec9b03
f889cdf
dec22a3
12ee41f
67d885c
a708682
c01396e
170706c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ A quick refresher on memory ordering: | |
|
||
// This is needed to prevent duplicate lang item definitions. | ||
#[cfg(test)] | ||
pub use realstd::unstable::intrinsics::{TyDesc, Opaque, TyVisitor, TypeId}; | ||
pub use realprim::intrinsics::{TyDesc, Opaque, TyVisitor, TypeId}; | ||
|
||
pub type GlueFn = extern "Rust" fn(*i8); | ||
|
||
|
@@ -502,10 +502,9 @@ extern "rust-intrinsic" { | |
/// `TypeId` represents a globally unique identifier for a type | ||
#[lang="type_id"] // This needs to be kept in lockstep with the code in trans/intrinsic.rs and | ||
// middle/lang_items.rs | ||
#[deriving(Eq, IterBytes)] | ||
#[cfg(not(test))] | ||
pub struct TypeId { | ||
priv t: u64, | ||
t: u64, | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought we wanted this to be I suppose it doesn't matter too much if intrinsics are always unstable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh! I had to make it pub to separate it from its Clone and Eq impls. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could come up with some way to make this private. In the future it's conceivable that Clone and Eq will end up in this crate again. |
||
|
||
#[cfg(not(test))] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add a doc comment about this crate? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. Sorry ... |
||
#[crate_id = "prim#0.10-pre"]; | ||
#[license = "MIT/ASL2"]; | ||
#[crate_type = "rlib"]; | ||
#[crate_type = "dylib"]; | ||
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png", | ||
html_favicon_url = "http://www.rust-lang.org/favicon.ico", | ||
html_root_url = "http://static.rust-lang.org/doc/master")]; | ||
|
||
#[no_std]; | ||
#[feature(globs)]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure that we need globs here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They came with the tests! |
||
#[feature(phase)]; | ||
#[feature(macro_rules)]; | ||
#[feature(managed_boxes)]; | ||
|
||
#[cfg(test)] #[phase(syntax)] extern mod std; | ||
|
||
#[cfg(test)] extern mod realprim = "prim"; | ||
#[cfg(test)] extern mod std; | ||
#[cfg(test)] extern mod rustuv; | ||
#[cfg(test)] extern mod green; | ||
#[cfg(test)] extern mod native; | ||
|
||
#[cfg(test)] pub use kinds = realprim::kinds; | ||
|
||
pub mod cast; | ||
pub mod intrinsics; | ||
#[cfg(not(test))] pub mod kinds; | ||
pub mod mem; | ||
pub mod ptr; | ||
pub mod raw; | ||
pub mod util; | ||
pub mod tuple; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a
DEPS_prim :=
line just to be explicit? It may also prevent warning about an uninitialized variable.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also it'd be cool to see an empty dependency line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.