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 15 pull requests #56977

Merged
merged 40 commits into from
Dec 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f59d645
Defactored Bytes::read
Lucretiel Nov 30, 2018
697b83b
Removed unnecessary buf subscript
Lucretiel Nov 30, 2018
7c05ef5
Typo
Lucretiel Nov 30, 2018
ca7de86
Remove lifetime from Resolver
Zoxc Dec 10, 2018
48c17a0
add a lint group for lints emitted by rustdoc
QuietMisdreavus Dec 10, 2018
55d20bf
update docs of rustdoc lints
QuietMisdreavus Dec 10, 2018
0fbe382
Add targets thumbv7neon-linux-androideabi and thumbv7neon-unknown-lin…
hsivonen Jun 4, 2018
37a3b7c
format: remove unreachable condition
ljedrz Dec 14, 2018
3d052c9
format: inline one-liners related to parse_expr
ljedrz Dec 14, 2018
8866f68
format: refactor report_invalid_references
ljedrz Dec 14, 2018
42167b9
fix issue 54153 by ignoring issue-18804 test on windows/mac.
pnkfelix Dec 13, 2018
002310a
format: refactor verify_arg_type
ljedrz Dec 14, 2018
959313a
format: minor stylistic improvements
ljedrz Dec 14, 2018
cd70d7d
Implement Eq, PartialEq and Hash for atomic::Ordering
Amanieu Dec 16, 2018
fca03e0
Fix grammar in compiler error for array iterators
mtrsl Dec 17, 2018
933efd7
Address LLVM assertion failure by prepopulating with *just* name-anon…
pnkfelix Dec 17, 2018
0b00dbe
Enable stack probes for UEFI images
tirr-c Dec 17, 2018
1b549eb
profiler: simplify total_duration
ljedrz Dec 17, 2018
826cda6
profiler: improve readability
ljedrz Dec 17, 2018
a0b766d
rustc: Don't ICE on usage of two new target features
alexcrichton Dec 17, 2018
25b3c82
Do not point at delim spans for complete correct blocks
estebank Dec 17, 2018
173a3b2
update release notes for rust 1.31.1
pietroalbini Dec 17, 2018
a1790e8
Reordered match arms
Lucretiel Dec 18, 2018
15ea63b
Update LLVM submodule
Dec 18, 2018
1182f09
Fix mobile menu rendering collision with tooltip.
JohnHeitmann Dec 18, 2018
cf9fd60
Rollup merge of #56363 - Lucretiel:patch-3, r=shepmaster
pietroalbini Dec 19, 2018
d3f6d61
Rollup merge of #56663 - Zoxc:resolver-lifetime, r=pnkfelix
pietroalbini Dec 19, 2018
b747425
Rollup merge of #56689 - QuietMisdreavus:rustdoc-lint-group, r=pnkfelix
pietroalbini Dec 19, 2018
6e1cc22
Rollup merge of #56772 - pnkfelix:issue-54153-linkage-sometimes-requi…
pietroalbini Dec 19, 2018
29aa466
Rollup merge of #56820 - ljedrz:format_tweaks, r=alexcrichton
pietroalbini Dec 19, 2018
b08a52c
Rollup merge of #56881 - Amanieu:ordering_eq, r=alexcrichton
pietroalbini Dec 19, 2018
39dc2c4
Rollup merge of #56907 - rumajo:master, r=kennytm,Centril
pietroalbini Dec 19, 2018
2e5a025
Rollup merge of #56908 - alexcrichton:new-features, r=oli-obk
pietroalbini Dec 19, 2018
5b41887
Rollup merge of #56910 - estebank:unclosed-eof, r=oli-obk
pietroalbini Dec 19, 2018
4bd8f2b
Rollup merge of #56913 - tirr-c:uefi-stack-probes, r=alexcrichton
pietroalbini Dec 19, 2018
758091c
Rollup merge of #56918 - ljedrz:profiler_nits, r=wesleywiser
pietroalbini Dec 19, 2018
e92a51b
Rollup merge of #56931 - pietroalbini:relnotes-1.31.1, r=pietroalbini
pietroalbini Dec 19, 2018
8ee2147
Rollup merge of #56947 - hsivonen:neon, r=alexcrichton
pietroalbini Dec 19, 2018
6dca15c
Rollup merge of #56948 - jethrogb:jb/update-llvm, r=nikic
pietroalbini Dec 19, 2018
1ba6ec4
Rollup merge of #56959 - JohnHeitmann:mobile-z-fix, r=GuillaumeGomez
pietroalbini Dec 19, 2018
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
11 changes: 11 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
Version 1.31.1 (2018-12-20)
===========================

- [Fix Rust failing to build on `powerpc-unknown-netbsd`][56562]
- [Fix broken go-to-definition in RLS][rls/1171]
- [Fix infinite loop on hover in RLS][rls/1170]

[56562]: https://github.com/rust-lang/rust/pull/56562
[rls/1171]: https://github.com/rust-lang/rls/issues/1171
[rls/1170]: https://github.com/rust-lang/rls/pull/1170

Version 1.31.0 (2018-12-06)
==========================

Expand Down
5 changes: 4 additions & 1 deletion src/bootstrap/cc_detect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ fn set_compiler(cfg: &mut cc::Build,
// compiler already takes into account the triple in question.
t if t.contains("android") => {
if let Some(ndk) = config.and_then(|c| c.ndk.as_ref()) {
let target = target.replace("armv7", "arm");
let target = target.replace("armv7neon", "arm")
.replace("armv7", "arm")
.replace("thumbv7neon", "arm")
.replace("thumbv7", "arm");
let compiler = format!("{}-{}", target, compiler.clang());
cfg.compiler(ndk.join("bin").join(compiler));
}
Expand Down
2 changes: 2 additions & 0 deletions src/bootstrap/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ def v(*args):
"arm-linux-androideabi NDK standalone path")
v("armv7-linux-androideabi-ndk", "target.armv7-linux-androideabi.android-ndk",
"armv7-linux-androideabi NDK standalone path")
v("thumbv7neon-linux-androideabi-ndk", "target.thumbv7neon-linux-androideabi.android-ndk",
"thumbv7neon-linux-androideabi NDK standalone path")
v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
"aarch64-linux-android NDK standalone path")
v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk",
Expand Down
2 changes: 2 additions & 0 deletions src/ci/docker/dist-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ RUN . /scripts/android-ndk.sh && \
# env
ENV TARGETS=arm-linux-androideabi
ENV TARGETS=$TARGETS,armv7-linux-androideabi
ENV TARGETS=$TARGETS,thumbv7neon-linux-androideabi
ENV TARGETS=$TARGETS,i686-linux-android
ENV TARGETS=$TARGETS,aarch64-linux-android
ENV TARGETS=$TARGETS,x86_64-linux-android
Expand All @@ -24,6 +25,7 @@ ENV RUST_CONFIGURE_ARGS \
--enable-extended \
--arm-linux-androideabi-ndk=/android/ndk/arm-14 \
--armv7-linux-androideabi-ndk=/android/ndk/arm-14 \
--thumbv7neon-linux-androideabi-ndk=/android/ndk/arm-14 \
--i686-linux-android-ndk=/android/ndk/x86-14 \
--aarch64-linux-android-ndk=/android/ndk/arm64-21 \
--x86_64-linux-android-ndk=/android/ndk/x86_64-21 \
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/iter/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fn _assert_is_object_safe(_: &dyn Iterator<Item=()>) {}
on(
_Self="[]",
label="borrow the array with `&` or call `.iter()` on it to iterate over it",
note="arrays are not an iterators, but slices like the following are: `&[1, 2, 3]`"
note="arrays are not iterators, but slices like the following are: `&[1, 2, 3]`"
),
on(
_Self="{integral}",
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ unsafe impl<T> Sync for AtomicPtr<T> {}
/// [Ordering::Relaxed]: #variant.Relaxed
/// [Ordering::SeqCst]: #variant.SeqCst
#[stable(feature = "rust1", since = "1.0.0")]
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
#[non_exhaustive]
pub enum Ordering {
/// No ordering constraints, only atomic operations.
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,19 +315,19 @@ declare_lint! {
declare_lint! {
pub INTRA_DOC_LINK_RESOLUTION_FAILURE,
Warn,
"warn about documentation intra links resolution failure"
"failures in resolving intra-doc link targets"
}

declare_lint! {
pub MISSING_DOC_CODE_EXAMPLES,
Allow,
"warn about missing code example in an item's documentation"
"detects publicly-exported items without code samples in their documentation"
}

declare_lint! {
pub PRIVATE_DOC_TESTS,
Allow,
"warn about doc test in private item"
"detects code samples in docs of private items not documented by rustdoc"
}

declare_lint! {
Expand Down
10 changes: 5 additions & 5 deletions src/librustc_driver/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,9 +730,9 @@ pub struct ExpansionResult {
pub hir_forest: hir_map::Forest,
}

pub struct InnerExpansionResult<'a, 'b: 'a> {
pub struct InnerExpansionResult<'a> {
pub expanded_crate: ast::Crate,
pub resolver: Resolver<'a, 'b>,
pub resolver: Resolver<'a>,
pub hir_forest: hir_map::Forest,
}

Expand Down Expand Up @@ -811,7 +811,7 @@ where

/// Same as phase_2_configure_and_expand, but doesn't let you keep the resolver
/// around
pub fn phase_2_configure_and_expand_inner<'a, 'b: 'a, F>(
pub fn phase_2_configure_and_expand_inner<'a, F>(
sess: &'a Session,
cstore: &'a CStore,
mut krate: ast::Crate,
Expand All @@ -820,9 +820,9 @@ pub fn phase_2_configure_and_expand_inner<'a, 'b: 'a, F>(
addl_plugins: Option<Vec<String>>,
make_glob_map: MakeGlobMap,
resolver_arenas: &'a ResolverArenas<'a>,
crate_loader: &'a mut CrateLoader<'b>,
crate_loader: &'a mut CrateLoader<'a>,
after_expand: F,
) -> Result<InnerExpansionResult<'a, 'b>, CompileIncomplete>
) -> Result<InnerExpansionResult<'a>, CompileIncomplete>
where
F: FnOnce(&ast::Crate) -> CompileResult,
{
Expand Down
119 changes: 57 additions & 62 deletions src/librustc_driver/profile/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ struct StackFrame {
}

fn total_duration(traces: &[trace::Rec]) -> Duration {
let mut sum : Duration = Duration::new(0, 0);
for t in traces.iter() { sum += t.dur_total; }
return sum
Duration::new(0, 0) + traces.iter().map(|t| t.dur_total).sum()
}

// profiling thread; retains state (in local variables) and dump traces, upon request.
Expand All @@ -93,50 +91,48 @@ fn profile_queries_thread(r: Receiver<ProfileQueriesMsg>) {
ProfileQueriesMsg::Dump(params) => {
assert!(stack.is_empty());
assert!(frame.parse_st == ParseState::Clear);
{
// write log of all messages
if params.dump_profq_msg_log {
let mut log_file =
File::create(format!("{}.log.txt", params.path)).unwrap();
for m in profq_msgs.iter() {
writeln!(&mut log_file, "{:?}", m).unwrap()
};
}

// write HTML file, and counts file
let html_path = format!("{}.html", params.path);
let mut html_file = File::create(&html_path).unwrap();
// write log of all messages
if params.dump_profq_msg_log {
let mut log_file =
File::create(format!("{}.log.txt", params.path)).unwrap();
for m in profq_msgs.iter() {
writeln!(&mut log_file, "{:?}", m).unwrap()
};
}

let counts_path = format!("{}.counts.txt", params.path);
let mut counts_file = File::create(&counts_path).unwrap();
// write HTML file, and counts file
let html_path = format!("{}.html", params.path);
let mut html_file = File::create(&html_path).unwrap();

writeln!(html_file,
"<html>\n<head>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"{}\">",
"profile_queries.css").unwrap();
writeln!(html_file, "<style>").unwrap();
trace::write_style(&mut html_file);
writeln!(html_file, "</style>\n</head>\n<body>").unwrap();
trace::write_traces(&mut html_file, &mut counts_file, &frame.traces);
writeln!(html_file, "</body>\n</html>").unwrap();
let counts_path = format!("{}.counts.txt", params.path);
let mut counts_file = File::create(&counts_path).unwrap();

let ack_path = format!("{}.ack", params.path);
let ack_file = File::create(&ack_path).unwrap();
drop(ack_file);
writeln!(html_file,
"<html>\n<head>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"{}\">",
"profile_queries.css").unwrap();
writeln!(html_file, "<style>").unwrap();
trace::write_style(&mut html_file);
writeln!(html_file, "</style>\n</head>\n<body>").unwrap();
trace::write_traces(&mut html_file, &mut counts_file, &frame.traces);
writeln!(html_file, "</body>\n</html>").unwrap();

// Tell main thread that we are done, e.g., so it can exit
params.ack.send(()).unwrap();
}
continue
let ack_path = format!("{}.ack", params.path);
let ack_file = File::create(&ack_path).unwrap();
drop(ack_file);

// Tell main thread that we are done, e.g., so it can exit
params.ack.send(()).unwrap();
}
// Actual query message:
msg => {
// Record msg in our log
profq_msgs.push(msg.clone());
// Respond to the message, knowing that we've already handled Halt and Dump, above.
match (frame.parse_st.clone(), msg) {
(_,ProfileQueriesMsg::Halt) => unreachable!(),
(_,ProfileQueriesMsg::Dump(_)) => unreachable!(),

(_, ProfileQueriesMsg::Halt) | (_, ProfileQueriesMsg::Dump(_)) => {
unreachable!();
},
// Parse State: Clear
(ParseState::Clear,
ProfileQueriesMsg::QueryBegin(span, querymsg)) => {
Expand All @@ -163,8 +159,8 @@ fn profile_queries_thread(r: Receiver<ProfileQueriesMsg>) {
ParseState::HaveQuery(q, start) => {
let duration = start.elapsed();
frame = StackFrame{
parse_st:ParseState::Clear,
traces:old_frame.traces
parse_st: ParseState::Clear,
traces: old_frame.traces
};
let dur_extent = total_duration(&provider_extent);
let trace = Rec {
Expand All @@ -181,18 +177,16 @@ fn profile_queries_thread(r: Receiver<ProfileQueriesMsg>) {
}
}
},


(ParseState::Clear,
ProfileQueriesMsg::TimeBegin(msg)) => {
let start = Instant::now();
frame.parse_st = ParseState::HaveTimeBegin(msg, start);
stack.push(frame);
frame = StackFrame{parse_st:ParseState::Clear, traces:vec![]};
frame = StackFrame{parse_st: ParseState::Clear, traces: vec![]};
},
(_, ProfileQueriesMsg::TimeBegin(_)) => {
panic!("parse error; did not expect time begin here");
},
(_, ProfileQueriesMsg::TimeBegin(_)) =>
panic!("parse error; did not expect time begin here"),

(ParseState::Clear,
ProfileQueriesMsg::TimeEnd) => {
let provider_extent = frame.traces;
Expand All @@ -204,8 +198,8 @@ fn profile_queries_thread(r: Receiver<ProfileQueriesMsg>) {
ParseState::HaveTimeBegin(msg, start) => {
let duration = start.elapsed();
frame = StackFrame{
parse_st:ParseState::Clear,
traces:old_frame.traces
parse_st: ParseState::Clear,
traces: old_frame.traces
};
let dur_extent = total_duration(&provider_extent);
let trace = Rec {
Expand All @@ -222,18 +216,19 @@ fn profile_queries_thread(r: Receiver<ProfileQueriesMsg>) {
}
}
},
(_, ProfileQueriesMsg::TimeEnd) => { panic!("parse error") }

(_, ProfileQueriesMsg::TimeEnd) => {
panic!("parse error")
},
(ParseState::Clear,
ProfileQueriesMsg::TaskBegin(key)) => {
let start = Instant::now();
frame.parse_st = ParseState::HaveTaskBegin(key, start);
stack.push(frame);
frame = StackFrame{parse_st:ParseState::Clear, traces:vec![]};
frame = StackFrame{ parse_st: ParseState::Clear, traces: vec![] };
},
(_, ProfileQueriesMsg::TaskBegin(_)) => {
panic!("parse error; did not expect time begin here");
},
(_, ProfileQueriesMsg::TaskBegin(_)) =>
panic!("parse error; did not expect time begin here"),

(ParseState::Clear,
ProfileQueriesMsg::TaskEnd) => {
let provider_extent = frame.traces;
Expand All @@ -245,8 +240,8 @@ fn profile_queries_thread(r: Receiver<ProfileQueriesMsg>) {
ParseState::HaveTaskBegin(key, start) => {
let duration = start.elapsed();
frame = StackFrame{
parse_st:ParseState::Clear,
traces:old_frame.traces
parse_st: ParseState::Clear,
traces: old_frame.traces
};
let dur_extent = total_duration(&provider_extent);
let trace = Rec {
Expand All @@ -263,8 +258,9 @@ fn profile_queries_thread(r: Receiver<ProfileQueriesMsg>) {
}
}
},
(_, ProfileQueriesMsg::TaskEnd) => { panic!("parse error") }

(_, ProfileQueriesMsg::TaskEnd) => {
panic!("parse error")
},
// Parse State: HaveQuery
(ParseState::HaveQuery(q,start),
ProfileQueriesMsg::CacheHit) => {
Expand All @@ -279,26 +275,25 @@ fn profile_queries_thread(r: Receiver<ProfileQueriesMsg>) {
frame.traces.push( trace );
frame.parse_st = ParseState::Clear;
},
(ParseState::HaveQuery(_,_),
(ParseState::HaveQuery(_, _),
ProfileQueriesMsg::ProviderBegin) => {
stack.push(frame);
frame = StackFrame{parse_st:ParseState::Clear, traces:vec![]};
frame = StackFrame{ parse_st: ParseState::Clear, traces: vec![] };
},

// Parse errors:

(ParseState::HaveQuery(q,_),
(ParseState::HaveQuery(q, _),
ProfileQueriesMsg::ProviderEnd) => {
panic!("parse error: unexpected ProviderEnd; \
expected something else to follow BeginQuery for {:?}", q)
},
(ParseState::HaveQuery(q1,_),
ProfileQueriesMsg::QueryBegin(span2,querymsg2)) => {
(ParseState::HaveQuery(q1, _),
ProfileQueriesMsg::QueryBegin(span2, querymsg2)) => {
panic!("parse error: unexpected QueryBegin; \
earlier query is unfinished: {:?} and now {:?}",
q1, Query{span:span2, msg:querymsg2})
q1, Query{span:span2, msg: querymsg2})
},

(ParseState::HaveTimeBegin(_, _), _) => {
unreachable!()
},
Expand Down
9 changes: 9 additions & 0 deletions src/librustc_lint/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ use rustc::lint::builtin::{
ABSOLUTE_PATHS_NOT_STARTING_WITH_CRATE,
ELIDED_LIFETIMES_IN_PATHS,
EXPLICIT_OUTLIVES_REQUIREMENTS,
INTRA_DOC_LINK_RESOLUTION_FAILURE,
MISSING_DOC_CODE_EXAMPLES,
PRIVATE_DOC_TESTS,
parser::QUESTION_MARK_MACRO_SEP
};
use rustc::session;
Expand Down Expand Up @@ -204,6 +207,12 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
// MACRO_USE_EXTERN_CRATE,
);

add_lint_group!(sess,
"rustdoc",
INTRA_DOC_LINK_RESOLUTION_FAILURE,
MISSING_DOC_CODE_EXAMPLES,
PRIVATE_DOC_TESTS);

// Guidelines for creating a future incompatibility lint:
//
// - Create a lint defaulting to warn as normal, with ideally the same error
Expand Down
Loading