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 14 pull requests #62902

Merged
merged 40 commits into from
Jul 23, 2019
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
50840ee
Delay bug; this sidesteps ICE'ing when compiler is just doing error-r…
pnkfelix Jul 9, 2019
837fe7b
Regression test.
pnkfelix Jul 9, 2019
d73c23d
explain how to search without owned data
RalfJung Jul 13, 2019
3f77f2c
better comments
RalfJung Jul 14, 2019
589f6a7
tries to refactor InterpError in mir
saleemjaffer Jul 18, 2019
469b7a9
rustc_typeck: improve diagnostics for _ const/static declarations
lundibundi Jul 18, 2019
c6735a6
fixup! rustc_typeck: improve diagnostics for _ const/static declarations
lundibundi Jul 19, 2019
10d4159
Revert "Disable stack probing for gnux32."
crlf0710 Jul 19, 2019
f5b2859
Handle more cases of typos misinterpreted as type ascription
estebank Jul 17, 2019
9dbe2e7
review comments
estebank Jul 19, 2019
b361864
fixup! rustc_typeck: improve diagnostics for _ const/static declarations
lundibundi Jul 19, 2019
c6e027d
fixup! rustc_typeck: improve diagnostics for _ const/static declarations
lundibundi Jul 19, 2019
2641bed
Tweak span for variant not found error
estebank Jul 20, 2019
fd352b0
alters the panic variant of InterpError
saleemjaffer Jul 20, 2019
18dceab
Add tests for issue-58887
JohnTitor Jul 21, 2019
e63fe15
move unescape module to rustc_lexer
matklad Jul 21, 2019
e75ae15
Move into existential-type dir
JohnTitor Jul 21, 2019
795d96d
Place::as_place_ref is now Place::as_ref
spastorino Jul 21, 2019
27b703d
add rustc_private as a proper language feature gate
matklad Jul 22, 2019
1a7127b
normalize use of backticks in compiler messages for librustc_allocator
Jul 22, 2019
4e02a1f
Change "OSX" to "macOS"
atouchet Jul 22, 2019
1ed375c
Update stage0.txt
git-iso Jul 23, 2019
7e612c1
Update src/librustc_lexer/src/lib.rs
matklad Jul 23, 2019
90426ed
moving some variants from InterpError to EvalErrorPanic
saleemjaffer Jul 20, 2019
3730ed9
renames EvalErrorPanic to PanicMessage
saleemjaffer Jul 23, 2019
f48ee09
Update stage0.txt
git-iso Jul 23, 2019
52e9e44
Rollup merge of #60951 - saleemjaffer:mir_better_error_enum, r=oli-obk
Mark-Simulacrum Jul 23, 2019
ad57597
Rollup merge of #62523 - pnkfelix:delay-bug-to-resolve-issue-62203-ic…
Mark-Simulacrum Jul 23, 2019
4264f83
Rollup merge of #62656 - RalfJung:contains-no-own, r=Dylan-DPC
Mark-Simulacrum Jul 23, 2019
ab7149b
Rollup merge of #62791 - estebank:type-ascription, r=petrochenkov
Mark-Simulacrum Jul 23, 2019
13775d2
Rollup merge of #62804 - lundibundi:help-infer-const-static, r=eddyb
Mark-Simulacrum Jul 23, 2019
66c2965
Rollup merge of #62808 - crlf0710:gnux32_stack_probe, r=nikic
Mark-Simulacrum Jul 23, 2019
24a8065
Rollup merge of #62817 - estebank:variant-sp, r=matthewjasper
Mark-Simulacrum Jul 23, 2019
8afc53c
Rollup merge of #62842 - JohnTitor:test-for-58887, r=alexreg
Mark-Simulacrum Jul 23, 2019
4cb3586
Rollup merge of #62851 - matklad:unescape, r=petrochenkov
Mark-Simulacrum Jul 23, 2019
b2155dd
Rollup merge of #62859 - spastorino:rename-to-as-ref, r=Centril
Mark-Simulacrum Jul 23, 2019
f11ffd3
Rollup merge of #62869 - matklad:feature-gate, r=Mark-Simulacrum
Mark-Simulacrum Jul 23, 2019
32e5f98
Rollup merge of #62880 - fakenine:normalize_use_of_backticks_compiler…
Mark-Simulacrum Jul 23, 2019
f1b267b
Rollup merge of #62885 - atouchet:macos, r=alexcrichton
Mark-Simulacrum Jul 23, 2019
c939db7
Rollup merge of #62889 - git-iso:patch-1, r=jonas-schievink
Mark-Simulacrum Jul 23, 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
14 changes: 7 additions & 7 deletions src/libsyntax/parse/diagnostics.rs
Original file line number Diff line number Diff line change
@@ -327,8 +327,8 @@ impl<'a> Parser<'a> {
self.token.is_keyword(kw::Return) ||
self.token.is_keyword(kw::While)
);
let cm = self.sess.source_map();
match (cm.lookup_line(self.token.span.lo()), cm.lookup_line(sp.lo())) {
let sm = self.sess.source_map();
match (sm.lookup_line(self.token.span.lo()), sm.lookup_line(sp.lo())) {
(Ok(ref a), Ok(ref b)) if a.line != b.line && is_semi_suggestable => {
// The spans are in different lines, expected `;` and found `let` or `return`.
// High likelihood that it is only a missing `;`.
@@ -376,9 +376,9 @@ impl<'a> Parser<'a> {
maybe_expected_semicolon: bool,
) {
if let Some((sp, likely_path)) = self.last_type_ascription {
let cm = self.sess.source_map();
let next_pos = cm.lookup_char_pos(self.token.span.lo());
let op_pos = cm.lookup_char_pos(sp.hi());
let sm = self.sess.source_map();
let next_pos = sm.lookup_char_pos(self.token.span.lo());
let op_pos = sm.lookup_char_pos(sp.hi());

if likely_path {
err.span_suggestion(
@@ -814,8 +814,8 @@ impl<'a> Parser<'a> {
return Ok(recovered);
}
}
let cm = self.sess.source_map();
match (cm.lookup_line(prev_sp.lo()), cm.lookup_line(sp.lo())) {
let sm = self.sess.source_map();
match (sm.lookup_line(prev_sp.lo()), sm.lookup_line(sp.lo())) {
(Ok(ref a), Ok(ref b)) if a.line == b.line => {
// When the spans are in the same line, it means that the only content
// between them is whitespace, point only at the found token.
12 changes: 3 additions & 9 deletions src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
@@ -2850,9 +2850,7 @@ impl<'a> Parser<'a> {

match (self.expr_is_complete(&lhs), AssocOp::from_token(&self.token)) {
(true, None) => {
if last_type_ascription_set {
self.last_type_ascription = None;
}
self.last_type_ascription = None;
// Semi-statement forms are odd. See https://github.com/rust-lang/rust/issues/29071
return Ok(lhs);
}
@@ -2867,18 +2865,14 @@ impl<'a> Parser<'a> {
// If the next token is a keyword, then the tokens above *are* unambiguously incorrect:
// `if x { a } else { b } && if y { c } else { d }`
if !self.look_ahead(1, |t| t.is_reserved_ident()) => {
if last_type_ascription_set {
self.last_type_ascription = None;
}
self.last_type_ascription = None;
// These cases are ambiguous and can't be identified in the parser alone
let sp = self.sess.source_map().start_point(self.token.span);
self.sess.ambiguous_block_expr_parse.borrow_mut().insert(sp, lhs.span);
return Ok(lhs);
}
(true, Some(ref op)) if !op.can_continue_expr_unambiguously() => {
if last_type_ascription_set {
self.last_type_ascription = None;
}
self.last_type_ascription = None;
return Ok(lhs);
}
(true, Some(_)) => {