Skip to content
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

Rollup of 9 pull requests #74415

Closed
wants to merge 58 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
c4b0265
Enable some timeouts in SGX platform
mzohreva Jun 12, 2020
d7dc64b
Handle spurious wakeups in wait_timeout_sgx
mzohreva Jun 12, 2020
c5d1fcd
Allow more ui tests for SGX
mzohreva Jun 12, 2020
3442d23
Improve wait_timeout_sgx, simplify usercalls::wait
mzohreva Jun 18, 2020
c457b67
Remove unnecessary check in SGX wait usercall
mzohreva Jul 1, 2020
a18848b
Create implib for dlls when testing MinGW targets
mati865 Jun 13, 2020
177a495
Allow matching test by target and env
mati865 Jul 3, 2020
3324bc5
Remove invalid test
mati865 Jul 3, 2020
17bc07d
Fix various tests to run on windows-gnu
mati865 Jul 3, 2020
1466598
Address review comments
mzohreva Jul 11, 2020
f970632
Don't render unstable for rustc docs
tesuji Jul 15, 2020
47fea96
Remove unused CSS rules for internal rustc items
tesuji Jul 15, 2020
8c6c1dd
Automatically calculate std::env::consts::ARCH.
ehuss May 21, 2020
432b4c1
Use cfg_if in libtest.
ehuss May 22, 2020
9e58908
Use cfg_if in libpanic_abort.
ehuss May 22, 2020
ef6c026
Improve ayu rustdoc theme
Aloso Jul 15, 2020
6e9a1de
Introduce restricted-std feature.
ehuss Jun 1, 2020
cee9f05
Tweak formatting.
ehuss Jul 7, 2020
0eb293d
Use an allow-list of platforms that support std.
ehuss Jul 7, 2020
3d44d3c
Simplify os_str_bytes cfg expression.
ehuss Jul 7, 2020
d08bb40
Remove drop-shadow
Aloso Jul 15, 2020
85c25ae
Move usercall_wait_timeout to abi::usercalls::wait_timeout
mzohreva Jul 15, 2020
1813ae7
Add RISC-V GNU/Linux to src/tools/build-manifest as a host platform
msizanoen1 Jul 16, 2020
03bbe9d
Clean up E0723 explanation
GuillaumeGomez Jul 16, 2020
8e92f4f
Remove unused `cx` parameter from `pathvec_std` and `path_std`.
nnethercote Jul 14, 2020
bccff14
Simplify `LifetimeBounds`.
nnethercote Jul 14, 2020
5271e98
Use get_module instead of `module_map` for `resolve_str_path_error`
jyn514 Jun 6, 2020
848a766
Use the scope of the imported variable for resolution, not the curren…
jyn514 Jun 6, 2020
69bd13f
Use DefId for modules
jyn514 Jun 7, 2020
c3d9a73
Don't panic on fake IDs
jyn514 Jun 7, 2020
20106d5
unwrap() -> expect()
jyn514 Jun 7, 2020
24c3d85
Make sure that module_id is actually a module
jyn514 Jun 7, 2020
9542e23
Add tests for basic intra-doc links
jyn514 Jun 8, 2020
99f34d8
Remove warnings
jyn514 Jun 8, 2020
e78d499
Add test for re-exports
jyn514 Jun 8, 2020
9eb6394
Add test for documenting the re-export
jyn514 Jun 8, 2020
71fe8f7
Add test for submodules in inner crate
jyn514 Jun 10, 2020
432b043
Move import to top of function
jyn514 Jun 10, 2020
769acba
#![deny(intra_doc_resolution_failure)]
jyn514 Jun 10, 2020
5f49f55
rand -> my_rand
jyn514 Jun 10, 2020
e63e5cd
Support intra-doc links on macro re-exports
jyn514 Jun 12, 2020
82b3b07
Support intra-doc links on trait and module re-exports
jyn514 Jul 11, 2020
0ad1dcd
Add more debugging
jyn514 Jul 12, 2020
8387e38
Add (broken and ignored) test for #73829
jyn514 Jul 15, 2020
c46e038
Fix invalid lint
jyn514 Jul 16, 2020
9f00808
Remove `ExtCtxt::ident_of`.
nnethercote Jul 14, 2020
002af4d
Avoid storing `SymbolStr` in a struct.
nnethercote Jul 13, 2020
f03c7f8
Add `UnsafetyViolationDetails`.
nnethercote Jul 14, 2020
a4ba181
Remove some `Symbol:as_str()` calls.
nnethercote Jul 14, 2020
dcd0180
Rollup merge of #73101 - jyn514:rustdoc-absolute-module, r=Manishearth
Manishearth Jul 16, 2020
599a77d
Rollup merge of #73269 - mzohreva:mz/sgx-wait-timeout, r=jethrogb
Manishearth Jul 16, 2020
9d59c05
Rollup merge of #74009 - mati865:mingw-tests-implib, r=nikomatsakis
Manishearth Jul 16, 2020
f14a5da
Rollup merge of #74033 - ehuss:std-compile-all-platforms, r=Mark-Simu…
Manishearth Jul 16, 2020
dbdc096
Rollup merge of #74351 - lzutao:remove-rustc-internal-compiler-warns,…
Manishearth Jul 16, 2020
6a4e73e
Rollup merge of #74357 - nnethercote:symbol-related-improvements, r=o…
Manishearth Jul 16, 2020
01c80f5
Rollup merge of #74371 - Aloso:patch-1, r=GuilliameGomez
Manishearth Jul 16, 2020
bea4bb9
Rollup merge of #74386 - msizanoen1:riscv-add-manifest-host, r=pietro…
Manishearth Jul 16, 2020
f97e6ad
Rollup merge of #74398 - GuillaumeGomez:cleanup-e0723, r=Dylan-DPC
Manishearth Jul 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2056,6 +2056,7 @@ dependencies = [
name = "panic_abort"
version = "0.0.0"
dependencies = [
"cfg-if",
"compiler_builtins",
"core",
"libc",
Expand Down Expand Up @@ -4552,6 +4553,7 @@ dependencies = [
name = "test"
version = "0.0.0"
dependencies = [
"cfg-if",
"core",
"getopts",
"libc",
Expand Down
1 change: 1 addition & 0 deletions src/libpanic_abort/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ bench = false
doc = false

[dependencies]
cfg-if = { version = "0.1.8", features = ['rustc-dep-of-std'] }
core = { path = "../libcore" }
libc = { version = "0.2", default-features = false }
compiler_builtins = "0.1.0"
35 changes: 19 additions & 16 deletions src/libpanic_abort/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,26 @@ pub unsafe extern "C" fn __rust_panic_cleanup(_: *mut u8) -> *mut (dyn Any + Sen
pub unsafe extern "C" fn __rust_start_panic(_payload: usize) -> u32 {
abort();

#[cfg(any(unix, target_os = "cloudabi"))]
unsafe fn abort() -> ! {
libc::abort();
}

#[cfg(any(windows, all(target_arch = "wasm32", not(target_os = "emscripten"))))]
unsafe fn abort() -> ! {
core::intrinsics::abort();
}

#[cfg(any(target_os = "hermit", all(target_vendor = "fortanix", target_env = "sgx")))]
unsafe fn abort() -> ! {
// call std::sys::abort_internal
extern "C" {
pub fn __rust_abort() -> !;
cfg_if::cfg_if! {
if #[cfg(any(unix, target_os = "cloudabi"))] {
unsafe fn abort() -> ! {
libc::abort();
}
} else if #[cfg(any(target_os = "hermit",
all(target_vendor = "fortanix", target_env = "sgx")
))] {
unsafe fn abort() -> ! {
// call std::sys::abort_internal
extern "C" {
pub fn __rust_abort() -> !;
}
__rust_abort();
}
} else {
unsafe fn abort() -> ! {
core::intrinsics::abort();
}
}
__rust_abort();
}
}

Expand Down
20 changes: 16 additions & 4 deletions src/libpanic_unwind/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,33 @@ cfg_if::cfg_if! {
if #[cfg(target_os = "emscripten")] {
#[path = "emcc.rs"]
mod real_imp;
} else if #[cfg(target_arch = "wasm32")] {
#[path = "dummy.rs"]
mod real_imp;
} else if #[cfg(target_os = "hermit")] {
#[path = "hermit.rs"]
mod real_imp;
} else if #[cfg(target_env = "msvc")] {
#[path = "seh.rs"]
mod real_imp;
} else {
} else if #[cfg(any(
all(target_family = "windows", target_env = "gnu"),
target_os = "cloudabi",
target_family = "unix",
all(target_vendor = "fortanix", target_env = "sgx"),
))] {
// Rust runtime's startup objects depend on these symbols, so make them public.
#[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))]
pub use real_imp::eh_frame_registry::*;
#[path = "gcc.rs"]
mod real_imp;
} else {
// Targets that don't support unwinding.
// - arch=wasm32
// - os=none ("bare metal" targets)
// - os=uefi
// - nvptx64-nvidia-cuda
// - avr-unknown-unknown
// - mipsel-sony-psp
#[path = "dummy.rs"]
mod real_imp;
}
}

Expand Down
1 change: 1 addition & 0 deletions src/libproc_macro/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#![feature(in_band_lifetimes)]
#![feature(negative_impls)]
#![feature(optin_builtin_traits)]
#![feature(restricted_std)]
#![feature(rustc_attrs)]
#![feature(min_specialization)]
#![recursion_limit = "256"]
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_builtin_macros/deriving/bounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ pub fn expand_deriving_copy(
let trait_def = TraitDef {
span,
attributes: Vec::new(),
path: path_std!(cx, marker::Copy),
path: path_std!(marker::Copy),
additional_bounds: Vec::new(),
generics: LifetimeBounds::empty(),
generics: Bounds::empty(),
is_unsafe: false,
supports_unions: true,
methods: Vec::new(),
Expand Down
8 changes: 4 additions & 4 deletions src/librustc_builtin_macros/deriving/clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub fn expand_deriving_clone(
}
}
ItemKind::Union(..) => {
bounds = vec![Literal(path_std!(cx, marker::Copy))];
bounds = vec![Literal(path_std!(marker::Copy))];
is_shallow = true;
substructure = combine_substructure(Box::new(|c, s, sub| {
cs_clone_shallow("Clone", c, s, sub, true)
Expand All @@ -78,14 +78,14 @@ pub fn expand_deriving_clone(
let trait_def = TraitDef {
span,
attributes: Vec::new(),
path: path_std!(cx, clone::Clone),
path: path_std!(clone::Clone),
additional_bounds: bounds,
generics: LifetimeBounds::empty(),
generics: Bounds::empty(),
is_unsafe: false,
supports_unions: true,
methods: vec![MethodDef {
name: sym::clone,
generics: LifetimeBounds::empty(),
generics: Bounds::empty(),
explicit_self: borrowed_explicit_self(),
args: Vec::new(),
ret_ty: Self_,
Expand Down
14 changes: 4 additions & 10 deletions src/librustc_builtin_macros/deriving/cmp/eq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ pub fn expand_deriving_eq(
let trait_def = TraitDef {
span,
attributes: Vec::new(),
path: path_std!(cx, cmp::Eq),
path: path_std!(cmp::Eq),
additional_bounds: Vec::new(),
generics: LifetimeBounds::empty(),
generics: Bounds::empty(),
is_unsafe: false,
supports_unions: true,
methods: vec![MethodDef {
name: sym::assert_receiver_is_total_eq,
generics: LifetimeBounds::empty(),
generics: Bounds::empty(),
explicit_self: borrowed_explicit_self(),
args: vec![],
ret_ty: nil_ty(),
Expand All @@ -43,13 +43,7 @@ pub fn expand_deriving_eq(
associated_types: Vec::new(),
};

super::inject_impl_of_structural_trait(
cx,
span,
item,
path_std!(cx, marker::StructuralEq),
push,
);
super::inject_impl_of_structural_trait(cx, span, item, path_std!(marker::StructuralEq), push);

trait_def.expand_ext(cx, mitem, item, push, true)
}
Expand Down
10 changes: 5 additions & 5 deletions src/librustc_builtin_macros/deriving/cmp/ord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ pub fn expand_deriving_ord(
let trait_def = TraitDef {
span,
attributes: Vec::new(),
path: path_std!(cx, cmp::Ord),
path: path_std!(cmp::Ord),
additional_bounds: Vec::new(),
generics: LifetimeBounds::empty(),
generics: Bounds::empty(),
is_unsafe: false,
supports_unions: false,
methods: vec![MethodDef {
name: sym::cmp,
generics: LifetimeBounds::empty(),
generics: Bounds::empty(),
explicit_self: borrowed_explicit_self(),
args: vec![(borrowed_self(), "other")],
ret_ty: Literal(path_std!(cx, cmp::Ordering)),
args: vec![(borrowed_self(), sym::other)],
ret_ty: Literal(path_std!(cmp::Ordering)),
attributes: attrs,
is_unsafe: false,
unify_fieldless_variants: true,
Expand Down
10 changes: 5 additions & 5 deletions src/librustc_builtin_macros/deriving/cmp/partial_eq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ pub fn expand_deriving_partial_eq(
let attrs = vec![cx.attribute(inline)];
MethodDef {
name: $name,
generics: LifetimeBounds::empty(),
generics: Bounds::empty(),
explicit_self: borrowed_explicit_self(),
args: vec![(borrowed_self(), "other")],
args: vec![(borrowed_self(), sym::other)],
ret_ty: Literal(path_local!(bool)),
attributes: attrs,
is_unsafe: false,
Expand All @@ -85,7 +85,7 @@ pub fn expand_deriving_partial_eq(
cx,
span,
item,
path_std!(cx, marker::StructuralPartialEq),
path_std!(marker::StructuralPartialEq),
push,
);

Expand All @@ -100,9 +100,9 @@ pub fn expand_deriving_partial_eq(
let trait_def = TraitDef {
span,
attributes: Vec::new(),
path: path_std!(cx, cmp::PartialEq),
path: path_std!(cmp::PartialEq),
additional_bounds: Vec::new(),
generics: LifetimeBounds::empty(),
generics: Bounds::empty(),
is_unsafe: false,
supports_unions: false,
methods,
Expand Down
16 changes: 8 additions & 8 deletions src/librustc_builtin_macros/deriving/cmp/partial_ord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ pub fn expand_deriving_partial_ord(
let attrs = vec![cx.attribute(inline)];
MethodDef {
name: $name,
generics: LifetimeBounds::empty(),
generics: Bounds::empty(),
explicit_self: borrowed_explicit_self(),
args: vec![(borrowed_self(), "other")],
args: vec![(borrowed_self(), sym::other)],
ret_ty: Literal(path_local!(bool)),
attributes: attrs,
is_unsafe: false,
Expand All @@ -37,9 +37,9 @@ pub fn expand_deriving_partial_ord(
}};
}

let ordering_ty = Literal(path_std!(cx, cmp::Ordering));
let ordering_ty = Literal(path_std!(cmp::Ordering));
let ret_ty = Literal(Path::new_(
pathvec_std!(cx, option::Option),
pathvec_std!(option::Option),
None,
vec![Box::new(ordering_ty)],
PathKind::Std,
Expand All @@ -50,9 +50,9 @@ pub fn expand_deriving_partial_ord(

let partial_cmp_def = MethodDef {
name: sym::partial_cmp,
generics: LifetimeBounds::empty(),
generics: Bounds::empty(),
explicit_self: borrowed_explicit_self(),
args: vec![(borrowed_self(), "other")],
args: vec![(borrowed_self(), sym::other)],
ret_ty,
attributes: attrs,
is_unsafe: false,
Expand Down Expand Up @@ -80,9 +80,9 @@ pub fn expand_deriving_partial_ord(
let trait_def = TraitDef {
span,
attributes: vec![],
path: path_std!(cx, cmp::PartialOrd),
path: path_std!(cmp::PartialOrd),
additional_bounds: vec![],
generics: LifetimeBounds::empty(),
generics: Bounds::empty(),
is_unsafe: false,
supports_unions: false,
methods,
Expand Down
21 changes: 11 additions & 10 deletions src/librustc_builtin_macros/deriving/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ pub fn expand_deriving_debug(
) {
// &mut ::std::fmt::Formatter
let fmtr =
Ptr(Box::new(Literal(path_std!(cx, fmt::Formatter))), Borrowed(None, ast::Mutability::Mut));
Ptr(Box::new(Literal(path_std!(fmt::Formatter))), Borrowed(None, ast::Mutability::Mut));

let trait_def = TraitDef {
span,
attributes: Vec::new(),
path: path_std!(cx, fmt::Debug),
path: path_std!(fmt::Debug),
additional_bounds: Vec::new(),
generics: LifetimeBounds::empty(),
generics: Bounds::empty(),
is_unsafe: false,
supports_unions: false,
methods: vec![MethodDef {
name: sym::fmt,
generics: LifetimeBounds::empty(),
generics: Bounds::empty(),
explicit_self: borrowed_explicit_self(),
args: vec![(fmtr, "f")],
ret_ty: Literal(path_std!(cx, fmt::Result)),
args: vec![(fmtr, sym::f)],
ret_ty: Literal(path_std!(fmt::Result)),
attributes: Vec::new(),
is_unsafe: false,
unify_fieldless_variants: false,
Expand Down Expand Up @@ -62,7 +62,7 @@ fn show_substructure(cx: &mut ExtCtxt<'_>, span: Span, substr: &Substructure<'_>
// We want to make sure we have the ctxt set so that we can use unstable methods
let span = cx.with_def_site_ctxt(span);
let name = cx.expr_lit(span, ast::LitKind::Str(ident.name, ast::StrStyle::Cooked));
let builder = cx.ident_of("debug_trait_builder", span);
let builder = Ident::new(sym::debug_trait_builder, span);
let builder_expr = cx.expr_ident(span, builder);

let fmt = substr.nonself_args[0].clone();
Expand All @@ -71,7 +71,8 @@ fn show_substructure(cx: &mut ExtCtxt<'_>, span: Span, substr: &Substructure<'_>
match vdata {
ast::VariantData::Tuple(..) | ast::VariantData::Unit(..) => {
// tuple struct/"normal" variant
let expr = cx.expr_method_call(span, fmt, cx.ident_of("debug_tuple", span), vec![name]);
let expr =
cx.expr_method_call(span, fmt, Ident::new(sym::debug_tuple, span), vec![name]);
stmts.push(cx.stmt_let(span, true, builder, expr));

for field in fields {
Expand All @@ -94,7 +95,7 @@ fn show_substructure(cx: &mut ExtCtxt<'_>, span: Span, substr: &Substructure<'_>
ast::VariantData::Struct(..) => {
// normal struct/struct variant
let expr =
cx.expr_method_call(span, fmt, cx.ident_of("debug_struct", span), vec![name]);
cx.expr_method_call(span, fmt, Ident::new(sym::debug_struct, span), vec![name]);
stmts.push(cx.stmt_let(DUMMY_SP, true, builder, expr));

for field in fields {
Expand All @@ -117,7 +118,7 @@ fn show_substructure(cx: &mut ExtCtxt<'_>, span: Span, substr: &Substructure<'_>
}
}

let expr = cx.expr_method_call(span, builder_expr, cx.ident_of("finish", span), vec![]);
let expr = cx.expr_method_call(span, builder_expr, Ident::new(sym::finish, span), vec![]);

stmts.push(cx.stmt_expr(expr));
let block = cx.block(span, stmts);
Expand Down
Loading