Skip to content

Commit

Permalink
Auto merge of #62542 - Centril:rollup-5mpb8tu, r=Centril
Browse files Browse the repository at this point in the history
Rollup of 9 pull requests

Successful merges:

 - #62417 (Fix ICEs when `Self` is used in type aliases)
 - #62450 (Raise the default recursion limit to 128)
 - #62470 (Prevent shrinking of "crate select" element on Firefox)
 - #62515 (cli: make help output for -l and -L consistent)
 - #62520 (Regression test for issue 42574.)
 - #62526 (normalize use of backticks in compiler messages for libsyntax/feature_gate.rs)
 - #62527 (clarify that debug_assert does not completely omits the code)
 - #62535 (ci: Configure $CI_JOB_NAME correctly)
 - #62541 (Add spastorino for rustc-guide toolstate)

Failed merges:

r? @ghost
  • Loading branch information
bors committed Jul 9, 2019
2 parents 0b680cf + e8cf614 commit e7efdf1
Show file tree
Hide file tree
Showing 254 changed files with 1,195 additions and 757 deletions.
4 changes: 3 additions & 1 deletion .azure-pipelines/steps/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ steps:

# Configure our CI_JOB_NAME variable which log analyzers can use for the main
# step to see what's going on.
- bash: echo "##vso[task.setvariable variable=CI_JOB_NAME]$SYSTEM_JOBNAME"
- bash: |
builder=$(echo $AGENT_JOBNAME | cut -d ' ' -f 2)
echo "##vso[task.setvariable variable=CI_JOB_NAME]$builder"
displayName: Configure Job Name

# As a quick smoke check on the otherwise very fast mingw-check linux builder
Expand Down
16 changes: 8 additions & 8 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ pub struct Compiler {

#[derive(PartialEq, Eq, Copy, Clone, Debug)]
pub enum DocTests {
// Default, run normal tests and doc tests.
/// Run normal tests and doc tests (default).
Yes,
// Do not run any doc tests.
/// Do not run any doc tests.
No,
// Only run doc tests.
/// Only run doc tests.
Only,
}

Expand All @@ -221,10 +221,10 @@ pub enum GitRepo {
/// methods specifically on this structure itself (to make it easier to
/// organize).
pub struct Build {
// User-specified configuration via config.toml
/// User-specified configuration from `config.toml`.
config: Config,

// Derived properties from the above two configurations
// Properties derived from the above configuration
src: PathBuf,
out: PathBuf,
rust_info: channel::GitInfo,
Expand All @@ -240,12 +240,12 @@ pub struct Build {
doc_tests: DocTests,
verbosity: usize,

// Targets for which to build.
// Targets for which to build
build: Interned<String>,
hosts: Vec<Interned<String>>,
targets: Vec<Interned<String>>,

// Stage 0 (downloaded) compiler and cargo or their local rust equivalents.
// Stage 0 (downloaded) compiler and cargo or their local rust equivalents
initial_rustc: PathBuf,
initial_cargo: PathBuf,

Expand All @@ -255,7 +255,7 @@ pub struct Build {
cxx: HashMap<Interned<String>, cc::Tool>,
ar: HashMap<Interned<String>, PathBuf>,
ranlib: HashMap<Interned<String>, PathBuf>,
// Misc
// Miscellaneous
crates: HashMap<Interned<String>, Crate>,
is_sudo: bool,
ci_env: CiEnv,
Expand Down
12 changes: 6 additions & 6 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ macro_rules! assert_ne {
/// # Uses
///
/// Unlike [`assert!`], `debug_assert!` statements are only enabled in non
/// optimized builds by default. An optimized build will omit all
/// optimized builds by default. An optimized build will not execute
/// `debug_assert!` statements unless `-C debug-assertions` is passed to the
/// compiler. This makes `debug_assert!` useful for checks that are too
/// expensive to be present in a release build but may be helpful during
/// development.
/// development. The result of expanding `debug_assert!` is always type checked.
///
/// An unchecked assertion allows a program in an inconsistent state to keep
/// running, which might have unexpected consequences but does not introduce
Expand Down Expand Up @@ -190,11 +190,11 @@ macro_rules! debug_assert {
/// debug representations.
///
/// Unlike [`assert_eq!`], `debug_assert_eq!` statements are only enabled in non
/// optimized builds by default. An optimized build will omit all
/// optimized builds by default. An optimized build will not execute
/// `debug_assert_eq!` statements unless `-C debug-assertions` is passed to the
/// compiler. This makes `debug_assert_eq!` useful for checks that are too
/// expensive to be present in a release build but may be helpful during
/// development.
/// development. The result of expanding `debug_assert_eq!` is always type checked.
///
/// [`assert_eq!`]: ../std/macro.assert_eq.html
///
Expand All @@ -217,11 +217,11 @@ macro_rules! debug_assert_eq {
/// debug representations.
///
/// Unlike [`assert_ne!`], `debug_assert_ne!` statements are only enabled in non
/// optimized builds by default. An optimized build will omit all
/// optimized builds by default. An optimized build will not execute
/// `debug_assert_ne!` statements unless `-C debug-assertions` is passed to the
/// compiler. This makes `debug_assert_ne!` useful for checks that are too
/// expensive to be present in a release build but may be helpful during
/// development.
/// development. The result of expanding `debug_assert_ne!` is always type checked.
///
/// [`assert_ne!`]: ../std/macro.assert_ne.html
///
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/recursion_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use syntax::symbol::{Symbol, sym};
use rustc_data_structures::sync::Once;

pub fn update_limits(sess: &Session, krate: &ast::Crate) {
update_limit(krate, &sess.recursion_limit, sym::recursion_limit, 64);
update_limit(krate, &sess.recursion_limit, sym::recursion_limit, 128);
update_limit(krate, &sess.type_length_limit, sym::type_length_limit, 1048576);
}

Expand Down
5 changes: 2 additions & 3 deletions src/librustc/session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1707,16 +1707,15 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
"",
"Add a directory to the library search path. The
optional KIND can be one of dependency, crate, native,
framework or all (the default).",
framework, or all (the default).",
"[KIND=]PATH",
),
opt::multi_s(
"l",
"",
"Link the generated crate(s) to the specified native
library NAME. The optional KIND can be one of
static, dylib, or framework. If omitted, dylib is
assumed.",
static, framework, or dylib (the default).",
"[KIND=]NAME",
),
opt::multi_s(
Expand Down
12 changes: 1 addition & 11 deletions src/librustc_resolve/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2523,17 +2523,7 @@ impl<'a> Resolver<'a> {
debug!("(resolving item) resolving {} ({:?})", name, item.node);

match item.node {
ItemKind::Ty(_, ref generics) => {
self.with_current_self_item(item, |this| {
this.with_generic_param_rib(HasGenericParams(generics, ItemRibKind), |this| {
let item_def_id = this.definitions.local_def_id(item.id);
this.with_self_rib(Res::SelfTy(Some(item_def_id), None), |this| {
visit::walk_item(this, item)
})
})
});
}

ItemKind::Ty(_, ref generics) |
ItemKind::Existential(_, ref generics) |
ItemKind::Fn(_, _, ref generics, _) => {
self.with_generic_param_rib(
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_typeck/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4458,7 +4458,7 @@ pub fn check_bounds_are_used<'tcx>(tcx: TyCtxt<'tcx>, generics: &ty::Generics, t
return;
}

// Make a vector of booleans initially false, set to true when used.
// Make a vector of booleans initially `false`; set to `true` when used.
let mut types_used = vec![false; own_counts.types];

for leaf_ty in ty.walk() {
Expand All @@ -4467,7 +4467,7 @@ pub fn check_bounds_are_used<'tcx>(tcx: TyCtxt<'tcx>, generics: &ty::Generics, t
types_used[index as usize - own_counts.lifetimes] = true;
} else if let ty::Error = leaf_ty.sty {
// If there is already another error, do not emit
// an error for not using a type Parameter.
// an error for not using a type parameter.
assert!(tcx.sess.has_errors());
return;
}
Expand Down
1 change: 1 addition & 0 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ a {
margin-top: 5px;
padding: 6px;
padding-right: 19px;
flex: none;
border: 0;
border-right: 0;
border-radius: 4px 0 0 4px;
Expand Down
26 changes: 13 additions & 13 deletions src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
cfg_fn!(dropck_eyepatch))),
(sym::unwind, Whitelisted, template!(List: "allowed|aborts"), Gated(Stability::Unstable,
sym::unwind_attributes,
"#[unwind] is experimental",
"`#[unwind]` is experimental",
cfg_fn!(unwind_attributes))),
(sym::used, Whitelisted, template!(Word), Ungated),

Expand Down Expand Up @@ -1551,13 +1551,13 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[

(sym::alloc_error_handler, Normal, template!(Word), Gated(Stability::Unstable,
sym::alloc_error_handler,
"#[alloc_error_handler] is an unstable feature",
"`#[alloc_error_handler]` is an unstable feature",
cfg_fn!(alloc_error_handler))),

// RFC 2412
(sym::optimize, Whitelisted, template!(List: "size|speed"), Gated(Stability::Unstable,
sym::optimize_attribute,
"#[optimize] attribute is an unstable feature",
"`#[optimize]` attribute is an unstable feature",
cfg_fn!(optimize_attribute))),

// Crate level attributes
Expand Down Expand Up @@ -1674,7 +1674,7 @@ impl<'a> Context<'a> {
if let Some(content) = attr.meta_item_list() {
if content.iter().any(|c| c.check_name(sym::include)) {
gate_feature!(self, external_doc, attr.span,
"#[doc(include = \"...\")] is experimental"
"`#[doc(include = \"...\")]` is experimental"
);
}
}
Expand Down Expand Up @@ -1803,7 +1803,7 @@ fn leveled_feature_err<'a, S: Into<MultiSpan>>(

// #23973: do not suggest `#![feature(...)]` if we are in beta/stable
if sess.unstable_features.is_nightly_build() {
err.help(&format!("add #![feature({})] to the crate attributes to enable", feature));
err.help(&format!("add `#![feature({})]` to the crate attributes to enable", feature));
}

// If we're on stable and only emitting a "soft" warning, add a note to
Expand Down Expand Up @@ -1985,23 +1985,23 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
if let Some(content) = attr.meta_item_list() {
if content.len() == 1 && content[0].check_name(sym::cfg) {
gate_feature_post!(&self, doc_cfg, attr.span,
"#[doc(cfg(...))] is experimental"
"`#[doc(cfg(...))]` is experimental"
);
} else if content.iter().any(|c| c.check_name(sym::masked)) {
gate_feature_post!(&self, doc_masked, attr.span,
"#[doc(masked)] is experimental"
"`#[doc(masked)]` is experimental"
);
} else if content.iter().any(|c| c.check_name(sym::spotlight)) {
gate_feature_post!(&self, doc_spotlight, attr.span,
"#[doc(spotlight)] is experimental"
"`#[doc(spotlight)]` is experimental"
);
} else if content.iter().any(|c| c.check_name(sym::alias)) {
gate_feature_post!(&self, doc_alias, attr.span,
"#[doc(alias = \"...\")] is experimental"
"`#[doc(alias = \"...\")]` is experimental"
);
} else if content.iter().any(|c| c.check_name(sym::keyword)) {
gate_feature_post!(&self, doc_keyword, attr.span,
"#[doc(keyword = \"...\")] is experimental"
"`#[doc(keyword = \"...\")]` is experimental"
);
}
}
Expand Down Expand Up @@ -2044,13 +2044,13 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
}
if attr::contains_name(&i.attrs[..], sym::start) {
gate_feature_post!(&self, start, i.span,
"a #[start] function is an experimental \
"a `#[start]` function is an experimental \
feature whose signature may change \
over time");
}
if attr::contains_name(&i.attrs[..], sym::main) {
gate_feature_post!(&self, main, i.span,
"declaration of a nonstandard #[main] \
"declaration of a non-standard `#[main]` \
function may change over time, for now \
a top-level `fn main()` is required");
}
Expand Down Expand Up @@ -2638,7 +2638,7 @@ fn maybe_stage_features(span_handler: &Handler, krate: &ast::Crate,
if attr.check_name(sym::feature) {
let release_channel = option_env!("CFG_RELEASE_CHANNEL").unwrap_or("(unknown)");
span_err!(span_handler, attr.span, E0554,
"#![feature] may not be used on the {} release channel",
"`#![feature]` may not be used on the {} release channel",
release_channel);
}
}
Expand Down
104 changes: 104 additions & 0 deletions src/test/rustdoc/deep-structures.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
// This test verifies that we do not hit recursion limit trying to prove auto-trait bounds for
// reasonably deep structures.

#![crate_type="rlib"]

pub struct A01(A02);
pub struct A02(A03);
pub struct A03(A04);
pub struct A04(A05);
pub struct A05(A06);
pub struct A06(A07);
pub struct A07(A08);
pub struct A08(A09);
pub struct A09(A10);
pub struct A10(A11);
pub struct A11(A12);
pub struct A12(A13);
pub struct A13(A14);
pub struct A14(A15);
pub struct A15(A16);
pub struct A16(A17);
pub struct A17(A18);
pub struct A18(A19);
pub struct A19(A20);
pub struct A20(A21);
pub struct A21(A22);
pub struct A22(A23);
pub struct A23(A24);
pub struct A24(A25);
pub struct A25(A26);
pub struct A26(A27);
pub struct A27(A28);
pub struct A28(A29);
pub struct A29(A30);
pub struct A30(A31);
pub struct A31(A32);
pub struct A32(A33);
pub struct A33(A34);
pub struct A34(A35);
pub struct A35(A36);
pub struct A36(A37);
pub struct A37(A38);
pub struct A38(A39);
pub struct A39(A40);
pub struct A40(A41);
pub struct A41(A42);
pub struct A42(A43);
pub struct A43(A44);
pub struct A44(A45);
pub struct A45(A46);
pub struct A46(A47);
pub struct A47(A48);
pub struct A48(A49);
pub struct A49(A50);
pub struct A50(A51);
pub struct A51(A52);
pub struct A52(A53);
pub struct A53(A54);
pub struct A54(A55);
pub struct A55(A56);
pub struct A56(A57);
pub struct A57(A58);
pub struct A58(A59);
pub struct A59(A60);
pub struct A60(A61);
pub struct A61(A62);
pub struct A62(A63);
pub struct A63(A64);
pub struct A64(A65);
pub struct A65(A66);
pub struct A66(A67);
pub struct A67(A68);
pub struct A68(A69);
pub struct A69(A70);
pub struct A70(A71);
pub struct A71(A72);
pub struct A72(A73);
pub struct A73(A74);
pub struct A74(A75);
pub struct A75(A76);
pub struct A76(A77);
pub struct A77(A78);
pub struct A78(A79);
pub struct A79(A80);
pub struct A80(A81);
pub struct A81(A82);
pub struct A82(A83);
pub struct A83(A84);
pub struct A84(A85);
pub struct A85(A86);
pub struct A86(A87);
pub struct A87(A88);
pub struct A88(A89);
pub struct A89(A90);
pub struct A90(A91);
pub struct A91(A92);
pub struct A92(A93);
pub struct A93(A94);
pub struct A94(A95);
pub struct A95(A96);
pub struct A96(A97);
pub struct A97(A98);
pub struct A98(A99);
pub struct A99;
2 changes: 1 addition & 1 deletion src/test/ui-fulldeps/gated-plugin.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | #![plugin(attr_plugin_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29597
= help: add #![feature(plugin)] to the crate attributes to enable
= help: add `#![feature(plugin)]` to the crate attributes to enable

error: aborting due to previous error

Expand Down
Loading

0 comments on commit e7efdf1

Please sign in to comment.