Skip to content

Rollup of 2 pull requests #59939

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

Closed
wants to merge 82 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
9eb6f32
Use normal newtype_index macro for MIR dataflow
matthewjasper Apr 1, 2019
968ea1c
Mark variables captured by reference as mutable correctly
matthewjasper Apr 4, 2019
63080b3
remove lookup_char_pos_adj
matklad Apr 5, 2019
1c3979c
Add book.toml to tools/unstable, add copy_book_toml to scipt
Apr 6, 2019
5ddb339
Remove copy_book_toml method in favor for copy_recursive
Apr 6, 2019
280277a
path -> from
Apr 6, 2019
442bef7
compiletest normalization: preserve non-JSON lines such as ICEs
RalfJung Apr 7, 2019
0c45546
fix tests
RalfJung Apr 7, 2019
83dcc96
fix output test for backtrace-debuginfo.rs
RalfJung Apr 7, 2019
be83bd5
normalize flags and rustc version in ICE repro
RalfJung Apr 7, 2019
126ac9e
Add test with current behaviour.
davidtwco Apr 7, 2019
34c1572
Change root path for unstable-book
Apr 7, 2019
b8e9da7
`asm!` output can neither be promotable nor const
oli-obk Apr 8, 2019
6b01844
Generalize initial "not const" assignments
oli-obk Apr 8, 2019
ec52065
Explicit promotion is indistinguishable from explicit promotion
oli-obk Apr 8, 2019
d3d5673
Get rid of "is not const" naming
oli-obk Apr 8, 2019
c63b9ff
Pacify tidy
oli-obk Apr 8, 2019
ae4717d
Elaborate on implicit promotability
oli-obk Apr 8, 2019
03727a4
Clean up jobserver integration
Zoxc Apr 8, 2019
724ca05
Exclude profiler-generated symbols from MSVC __imp_-symbol workaround.
michaelwoerister Apr 9, 2019
3a35b7e
normalize away spurious error
RalfJung Apr 9, 2019
8861232
some more tests need normalization
RalfJung Apr 9, 2019
1ad46cd
Fix links on keyword docs.
ehuss Apr 9, 2019
6635fbe
Eliminate `FnBox` usages from libstd.
crlf0710 Apr 9, 2019
2f97552
Re-export NonZero signed variant in std
tesuji Apr 10, 2019
404df31
Update ui test
tesuji Apr 10, 2019
f10394a
Documentation should have proper grammar
oli-obk Apr 10, 2019
acf3ddb
std: Add `{read,write}_vectored` for more types
alexcrichton Apr 10, 2019
825a11e
Fix attributes position in type declaration
GuillaumeGomez Apr 10, 2019
c440c0a
update polonius-engine
Apr 2, 2019
d7f5c50
make duplicate matcher bindings a hard error
mark-i-m Mar 28, 2019
6fd3f5a
forgot one
mark-i-m Apr 11, 2019
7b1df42
Clean up handling of -Zpgo-gen commandline option.
michaelwoerister Apr 10, 2019
22f2afe
Use SecRandomCopyBytes instead of /dev/urandom on MacOS
ebarnard Apr 11, 2019
e149dc0
remove warn
mark-i-m Apr 11, 2019
d84907b
Suggest macro import from crate root.
davidtwco Apr 7, 2019
d589cf9
Handle renamed imports.
davidtwco Apr 7, 2019
7c95540
Handle edge cases.
davidtwco Apr 7, 2019
137ffa1
Improve robustness of nested check.
davidtwco Apr 11, 2019
5158063
Switch to multipart suggestions.
davidtwco Apr 11, 2019
ca1ab3e
In `-Zprint-type-size` output, sort enum variants by size.
nnethercote Apr 12, 2019
633fc9e
Revert PR #59401 to fix issue #59652 (a stable-to-beta regression).
pnkfelix Apr 12, 2019
1ce6645
MaybeUninit: remove deprecated functions
RalfJung Apr 12, 2019
796e6e3
Don't generate empty json variables
GuillaumeGomez Apr 11, 2019
4f28431
Apply resource-suffix to search-index and source-files scripts as well
GuillaumeGomez Apr 7, 2019
7e62052
Use a proc macro to declare preallocated symbols
Zoxc Apr 3, 2019
0e26063
Make check_name generic
Zoxc Apr 5, 2019
9c63475
Ensure the symbols are pure strings
Zoxc Apr 9, 2019
856c8a0
Move modules outside the proc macro
Zoxc Apr 9, 2019
b5f246a
Use colon for keyword defs
Zoxc Apr 9, 2019
fc928a1
Stabilize the `alloc` crate.
SimonSapin Apr 3, 2019
b27bcc0
Fix paste error in split_ascii_whitespace docs.
solson Apr 12, 2019
0a9b214
Exclude some copies of old book editions from search engines
kornelski Apr 12, 2019
8d9c735
Rollup merge of #59612 - matthewjasper:dataflow-usual-newtype-index, …
Centril Apr 13, 2019
84c8966
Rollup merge of #59675 - SimonSapin:stable-alloc, r=alexcrichton
Centril Apr 13, 2019
83da8f4
Rollup merge of #59708 - matthewjasper:double-closure-unused-mut, r=p…
Centril Apr 13, 2019
b15ab20
Rollup merge of #59735 - matklad:deadcode, r=sanxiyn
Centril Apr 13, 2019
edc3979
Rollup merge of #59747 - gruberb:copy-book-toml-unstable-book, r=ehuss
Centril Apr 13, 2019
ad30fd3
Rollup merge of #59796 - oli-obk:const_arg_ice, r=eddyb
Centril Apr 13, 2019
afafbff
Rollup merge of #59804 - Zoxc:cleaner-jobserver, r=alexcrichton
Centril Apr 13, 2019
f8a2d48
Rollup merge of #59818 - crlf0710:eliminate_libstd_fnbox, r=cramertj
Centril Apr 13, 2019
c89a3c9
Rollup merge of #59830 - ehuss:keyword-links, r=Mark-Simulacrum
Centril Apr 13, 2019
1d1693c
Rollup merge of #59835 - lzutao:nonzero-signed, r=Mark-Simulacrum
Centril Apr 13, 2019
09cd478
Rollup merge of #59852 - alexcrichton:more-vectored, r=sfackler
Centril Apr 13, 2019
df31fc6
Rollup merge of #59855 - GuillaumeGomez:fix-attr-position-in-type-dec…
Centril Apr 13, 2019
009a41f
Rollup merge of #59858 - mark-i-m:dup-matcher-bindings-3, r=Centril
Centril Apr 13, 2019
4f34501
Rollup merge of #59879 - ebarnard:patch-1, r=alexcrichton
Centril Apr 13, 2019
2fa3a71
Rollup merge of #59899 - nnethercote:sort-enum-variants-by-size, r=pn…
Centril Apr 13, 2019
f76753c
Rollup merge of #59912 - RalfJung:maybe-uninit, r=Centril
Centril Apr 13, 2019
33561e2
Rollup merge of #59925 - solson:split_ascii_whitespace-docfix, r=Centril
Centril Apr 13, 2019
b613fd2
Rollup merge of #59930 - kornelski:first-robots, r=GuillaumeGomez
Centril Apr 13, 2019
6688e02
Rollup merge of #59655 - Zoxc:symbols, r=petrochenkov
Centril Apr 13, 2019
8443fee
Rollup merge of #59769 - RalfJung:compiletest-normalization, r=alexcr…
Centril Apr 13, 2019
ba4a6e5
Rollup merge of #59776 - GuillaumeGomez:apply-resource-suffix, r=Quie…
Centril Apr 13, 2019
dbaf5fc
Rollup merge of #59784 - davidtwco:issue-59764, r=estebank
Centril Apr 13, 2019
d201ee4
Rollup merge of #59812 - michaelwoerister:profile-gen-msvc-imp, r=ale…
Centril Apr 13, 2019
3c01677
Rollup merge of #59856 - albins:update-polonius, r=nikomatsakis
Centril Apr 13, 2019
86ce22f
Rollup merge of #59874 - michaelwoerister:pgo-updates-1, r=cramertj
Centril Apr 13, 2019
1587ea6
Rollup merge of #59890 - GuillaumeGomez:empty-json-variables, r=Quiet…
Centril Apr 13, 2019
22a6e9e
Rollup merge of #59911 - pnkfelix:revert-pr-59401-to-fix-emit-stack-s…
Centril Apr 13, 2019
30a61c9
Rollup merge of #59937 - Centril:rollup-6pousju, r=Centril
Centril Apr 13, 2019
8cbb829
Rollup merge of #59938 - Centril:rollup-u6r5nca, r=Centril
Centril Apr 13, 2019
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
9 changes: 5 additions & 4 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "polonius-engine"
version = "0.6.2"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"datafrog 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -2328,7 +2328,7 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"polonius-engine 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"polonius-engine 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-rayon 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-rayon-core 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_apfloat 0.0.0",
Expand Down Expand Up @@ -2828,7 +2828,7 @@ dependencies = [
"graphviz 0.0.0",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"log_settings 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"polonius-engine 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"polonius-engine 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc_apfloat 0.0.0",
"rustc_data_structures 0.0.0",
Expand Down Expand Up @@ -3374,6 +3374,7 @@ dependencies = [
"arena 0.0.0",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_data_structures 0.0.0",
"rustc_macros 0.1.0",
"scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serialize 0.0.0",
"unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -4150,7 +4151,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum phf_generator 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)" = "05a079dd052e7b674d21cb31cbb6c05efd56a2cd2827db7692e2f1a507ebd998"
"checksum phf_shared 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)" = "c2261d544c2bb6aa3b10022b0be371b9c7c64f762ef28c6f5d4f1ef6d97b5930"
"checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c"
"checksum polonius-engine 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2490c396085801abf88df91758bad806b0890354f0875d624e62ecf0579a8145"
"checksum polonius-engine 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b24942fee141ea45628484a453762bb7e515099c3ec05fbeb76b7bf57b1aeed"
"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
"checksum pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a029430f0d744bc3d15dd474d591bed2402b645d024583082b9f63bb936dac6"
"checksum pretty_env_logger 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df8b3f4e0475def7d9c2e5de8e5a1306949849761e107b360d03e98eafaffd61"
Expand Down
27 changes: 0 additions & 27 deletions src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,33 +187,6 @@ fn main() {
cmd.arg("-C").arg(format!("debug-assertions={}", debug_assertions));
}

// Build all crates in the `std` facade with `-Z emit-stack-sizes` to add stack usage
// information.
//
// When you use this `-Z` flag with Cargo you get stack usage information on all crates
// compiled from source, and when you are using LTO you also get information on pre-compiled
// crates like `core` and `std`, even if they were not compiled with `-Z emit-stack-sizes`.
// However, there's an exception: `compiler_builtins`. This crate is special and doesn't
// participate in LTO because it's always linked as a separate object file. For this reason
// it's impossible to get stack usage information about `compiler-builtins` using
// `RUSTFLAGS` + Cargo, or `cargo rustc`.
//
// To make the stack usage information of all crates under the `std` facade available to
// Cargo based stack usage analysis tools, in both LTO and non-LTO mode, we compile them
// with the `-Z emit-stack-sizes` flag. The `RUSTC_EMIT_STACK_SIZES` var helps us apply this
// flag only to the crates in the `std` facade. The `-Z` flag is known to currently work
// with targets that produce ELF files so we limit its use flag to those targets.
//
// NOTE(japaric) if this ever causes problem with an LLVM upgrade or any PR feel free to
// remove it or comment it out
if env::var_os("RUSTC_EMIT_STACK_SIZES").is_some()
&& (target.contains("-linux-")
|| target.contains("-none-eabi")
|| target.ends_with("-none-elf"))
{
cmd.arg("-Zemit-stack-sizes");
}

if let Ok(s) = env::var("RUSTC_CODEGEN_UNITS") {
cmd.arg("-C").arg(format!("codegen-units={}", s));
}
Expand Down
4 changes: 0 additions & 4 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ impl Step for Std {
let _folder = builder.fold_output(|| format!("stage{}-std", compiler.stage));
builder.info(&format!("Building stage{} std artifacts ({} -> {})", compiler.stage,
&compiler.host, target));
// compile with `-Z emit-stack-sizes`; see bootstrap/src/rustc.rs for more details
cargo.env("RUSTC_EMIT_STACK_SIZES", "1");
run_cargo(builder,
&mut cargo,
&libstd_stamp(builder, compiler, target),
Expand Down Expand Up @@ -397,8 +395,6 @@ impl Step for Test {
let _folder = builder.fold_output(|| format!("stage{}-test", compiler.stage));
builder.info(&format!("Building stage{} test artifacts ({} -> {})", compiler.stage,
&compiler.host, target));
// compile with `-Z emit-stack-sizes`; see bootstrap/src/rustc.rs for more details
cargo.env("RUSTC_EMIT_STACK_SIZES", "1");
run_cargo(builder,
&mut cargo,
&libtest_stamp(builder, compiler, target),
Expand Down
8 changes: 8 additions & 0 deletions src/doc/robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ Disallow: /1.0.0-beta.2/
Disallow: /1.0.0-beta.3/
Disallow: /1.0.0-beta.4/
Disallow: /1.0.0-beta.5/
Disallow: /book/first-edition/
Disallow: /book/second-edition/
Disallow: /stable/book/first-edition/
Disallow: /stable/book/second-edition/
Disallow: /beta/book/first-edition/
Disallow: /beta/book/second-edition/
Disallow: /nightly/book/first-edition/
Disallow: /nightly/book/second-edition/
1 change: 1 addition & 0 deletions src/doc/unstable-book/book.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[book]
title = "The Rust Unstable Book"
author = "The Rust Community"
5 changes: 1 addition & 4 deletions src/liballoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@
//! default global allocator. It is not compatible with the libc allocator API.

#![allow(unused_attributes)]
#![unstable(feature = "alloc",
reason = "this library is unlikely to be stabilized in its current \
form or name",
issue = "27783")]
#![stable(feature = "alloc", since = "1.36.0")]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/",
issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))]
Expand Down
1 change: 0 additions & 1 deletion src/liballoc/prelude/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
//!
//! ```
//! # #![allow(unused_imports)]
//! # #![feature(alloc)]
//! #![feature(alloc_prelude)]
//! extern crate alloc;
//! use alloc::prelude::v1::*;
Expand Down
4 changes: 2 additions & 2 deletions src/liballoc/raw_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ impl<T, A: Alloc> RawVec<T, A> {
/// # Examples
///
/// ```
/// # #![feature(alloc, raw_vec_internals)]
/// # #![feature(raw_vec_internals)]
/// # extern crate alloc;
/// # use std::ptr;
/// # use alloc::raw_vec::RawVec;
Expand Down Expand Up @@ -460,7 +460,7 @@ impl<T, A: Alloc> RawVec<T, A> {
/// # Examples
///
/// ```
/// # #![feature(alloc, raw_vec_internals)]
/// # #![feature(raw_vec_internals)]
/// # extern crate alloc;
/// # use std::ptr;
/// # use alloc::raw_vec::RawVec;
Expand Down
1 change: 0 additions & 1 deletion src/libarena/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#![deny(rust_2018_idioms)]
#![cfg_attr(not(stage0), deny(internal))]

#![feature(alloc)]
#![feature(core_intrinsics)]
#![feature(dropck_eyepatch)]
#![feature(raw_vec_internals)]
Expand Down
34 changes: 0 additions & 34 deletions src/libcore/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1152,15 +1152,6 @@ impl<T> MaybeUninit<T> {
MaybeUninit { uninit: () }
}

/// Deprecated before stabilization.
#[unstable(feature = "maybe_uninit", issue = "53491")]
#[inline(always)]
// FIXME: still used by stdsimd
// #[rustc_deprecated(since = "1.35.0", reason = "use `uninit` instead")]
pub const fn uninitialized() -> MaybeUninit<T> {
Self::uninit()
}

/// Creates a new `MaybeUninit<T>` in an uninitialized state, with the memory being
/// filled with `0` bytes. It depends on `T` whether that already makes for
/// proper initialization. For example, `MaybeUninit<usize>::zeroed()` is initialized,
Expand Down Expand Up @@ -1221,14 +1212,6 @@ impl<T> MaybeUninit<T> {
}
}

/// Deprecated before stabilization.
#[unstable(feature = "maybe_uninit", issue = "53491")]
#[inline(always)]
#[rustc_deprecated(since = "1.35.0", reason = "use `write` instead")]
pub fn set(&mut self, val: T) -> &mut T {
self.write(val)
}

/// Gets a pointer to the contained value. Reading from this pointer or turning it
/// into a reference is undefined behavior unless the `MaybeUninit<T>` is initialized.
///
Expand Down Expand Up @@ -1346,15 +1329,6 @@ impl<T> MaybeUninit<T> {
ManuallyDrop::into_inner(self.value)
}

/// Deprecated before stabilization.
#[unstable(feature = "maybe_uninit", issue = "53491")]
#[inline(always)]
// FIXME: still used by stdsimd
// #[rustc_deprecated(since = "1.35.0", reason = "use `assume_init` instead")]
pub unsafe fn into_initialized(self) -> T {
self.assume_init()
}

/// Reads the value from the `MaybeUninit<T>` container. The resulting `T` is subject
/// to the usual drop handling.
///
Expand Down Expand Up @@ -1417,14 +1391,6 @@ impl<T> MaybeUninit<T> {
self.as_ptr().read()
}

/// Deprecated before stabilization.
#[unstable(feature = "maybe_uninit", issue = "53491")]
#[inline(always)]
#[rustc_deprecated(since = "1.35.0", reason = "use `read` instead")]
pub unsafe fn read_initialized(&self) -> T {
self.read()
}

/// Gets a reference to the contained value.
///
/// # Safety
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2712,7 +2712,7 @@ impl str {
/// All kinds of ASCII whitespace are considered:
///
/// ```
/// let mut iter = " Mary had\ta little \n\t lamb".split_whitespace();
/// let mut iter = " Mary had\ta little \n\t lamb".split_ascii_whitespace();
/// assert_eq!(Some("Mary"), iter.next());
/// assert_eq!(Some("had"), iter.next());
/// assert_eq!(Some("a"), iter.next());
Expand Down
2 changes: 0 additions & 2 deletions src/libpanic_unwind/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

#![deny(rust_2018_idioms)]

#![feature(allocator_api)]
#![feature(alloc)]
#![feature(core_intrinsics)]
#![feature(lang_items)]
#![feature(libc)]
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ lazy_static = "1.0.0"
num_cpus = "1.0"
scoped-tls = "1.0"
log = { version = "0.4", features = ["release_max_level_info", "std"] }
polonius-engine = "0.6.2"
polonius-engine = "0.7.0"
rustc-rayon = "0.1.2"
rustc-rayon-core = "0.1.2"
rustc_apfloat = { path = "../librustc_apfloat" }
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/error_reporting/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
}

fn explain_span(self, heading: &str, span: Span) -> (String, Option<Span>) {
let lo = self.sess.source_map().lookup_char_pos_adj(span.lo());
let lo = self.sess.source_map().lookup_char_pos(span.lo());
(
format!("the {} at {}:{}", heading, lo.line, lo.col.to_usize() + 1),
Some(span),
Expand Down
7 changes: 0 additions & 7 deletions src/librustc/lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,12 +352,6 @@ declare_lint! {
"outlives requirements can be inferred"
}

declare_lint! {
pub DUPLICATE_MATCHER_BINDING_NAME,
Deny,
"duplicate macro matcher binding name"
}

/// Some lints that are buffered from `libsyntax`. See `syntax::early_buffered_lints`.
pub mod parser {
declare_lint! {
Expand Down Expand Up @@ -462,7 +456,6 @@ declare_lint_pass! {
DEPRECATED_IN_FUTURE,
AMBIGUOUS_ASSOCIATED_ITEMS,
NESTED_IMPL_TRAIT,
DUPLICATE_MATCHER_BINDING_NAME,
MUTABLE_BORROW_RESERVATION_CONFLICT,
]
}
Expand Down
3 changes: 1 addition & 2 deletions src/librustc/lint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use rustc_data_structures::sync::{self, Lrc};
use crate::hir::def_id::{CrateNum, LOCAL_CRATE};
use crate::hir::intravisit;
use crate::hir;
use crate::lint::builtin::{BuiltinLintDiagnostics, DUPLICATE_MATCHER_BINDING_NAME};
use crate::lint::builtin::BuiltinLintDiagnostics;
use crate::lint::builtin::parser::{QUESTION_MARK_MACRO_SEP, ILL_FORMED_ATTRIBUTE_INPUT};
use crate::session::{Session, DiagnosticMessageId};
use crate::ty::TyCtxt;
Expand Down Expand Up @@ -82,7 +82,6 @@ impl Lint {
match lint_id {
BufferedEarlyLintId::QuestionMarkMacroSep => QUESTION_MARK_MACRO_SEP,
BufferedEarlyLintId::IllFormedAttributeInput => ILL_FORMED_ATTRIBUTE_INPUT,
BufferedEarlyLintId::DuplicateMacroMatcherBindingName => DUPLICATE_MATCHER_BINDING_NAME,
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/librustc/middle/lib_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::ty::TyCtxt;
use crate::hir::intravisit::{self, NestedVisitorMap, Visitor};
use syntax::symbol::Symbol;
use syntax::ast::{Attribute, MetaItem, MetaItemKind};
use syntax_pos::Span;
use syntax_pos::{Span, symbols};
use rustc_data_structures::fx::{FxHashSet, FxHashMap};
use rustc_macros::HashStable;
use errors::DiagnosticId;
Expand Down Expand Up @@ -51,12 +51,12 @@ impl<'a, 'tcx> LibFeatureCollector<'a, 'tcx> {
}

fn extract(&self, attr: &Attribute) -> Option<(Symbol, Option<Symbol>, Span)> {
let stab_attrs = vec!["stable", "unstable", "rustc_const_unstable"];
let stab_attrs = [symbols::stable, symbols::unstable, symbols::rustc_const_unstable];

// Find a stability attribute (i.e., `#[stable (..)]`, `#[unstable (..)]`,
// `#[rustc_const_unstable (..)]`).
if let Some(stab_attr) = stab_attrs.iter().find(|stab_attr| {
attr.check_name(stab_attr)
attr.check_name(**stab_attr)
}) {
let meta_item = attr.meta();
if let Some(MetaItem { node: MetaItemKind::List(ref metas), .. }) = meta_item {
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/mir/interpret/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ impl<'tcx> fmt::Display for FrameInfo<'tcx> {
write!(f, "inside call to `{}`", self.instance)?;
}
if !self.call_site.is_dummy() {
let lo = tcx.sess.source_map().lookup_char_pos_adj(self.call_site.lo());
write!(f, " at {}:{}:{}", lo.filename, lo.line, lo.col.to_usize() + 1)?;
let lo = tcx.sess.source_map().lookup_char_pos(self.call_site.lo());
write!(f, " at {}:{}:{}", lo.file.name, lo.line, lo.col.to_usize() + 1)?;
}
Ok(())
})
Expand Down
8 changes: 7 additions & 1 deletion src/librustc/session/code_stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ impl CodeStats {
overall_size: Size,
packed: bool,
opt_discr_size: Option<Size>,
variants: Vec<VariantInfo>) {
mut variants: Vec<VariantInfo>) {
// Sort variants so the largest ones are shown first. A stable sort is
// used here so that source code order is preserved for all variants
// that have the same size.
variants.sort_by(|info1, info2| {
info2.size.cmp(&info1.size)
});
let info = TypeSizeInfo {
kind,
type_description: type_desc.to_string(),
Expand Down
Loading