Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ae46434
Remove "static item recursion checking" in favor of relying on cycle …
Zoxc Feb 3, 2018
46a3f2f
Change error message for E0391 to "cyclic dependency detected"
Zoxc Feb 9, 2018
335e25f
incr.comp.: Don't keep RefCells in on-disk-cache borrowed in order to…
michaelwoerister Feb 13, 2018
75f72c0
Make nested impl Trait a hard error
cramertj Feb 8, 2018
70e1f4f
Disallow projections from impl Trait types
cramertj Feb 9, 2018
f1fbf79
Amend nested impl Trait error message
cramertj Feb 14, 2018
dbacf0c
Test err on impl Trait projection within dyn Trait
cramertj Feb 14, 2018
d4b8475
incr.comp.: Store DepNode colors in a dense array instead of a hashmap.
michaelwoerister Feb 13, 2018
9e9c55f
Update E0657 stderr to match changed test
cramertj Feb 14, 2018
fe0260f
mir: Gather move at SwitchInt, Assert terminators
fpoli Feb 15, 2018
b9fa2da
Avoid ICE in arg mistmatch error for tuple variants
estebank Feb 15, 2018
10fbdb8
save-analysis: power through bracket mis-counts
Feb 16, 2018
42df8c5
unused_unsafe: don't label irrelevant fns
ExpHP Feb 18, 2018
d5ed655
Use DefId instead of NodeId while generating debuginfo for statics.
michaelwoerister Feb 19, 2018
15ff0ad
Use DefId instead of NodeId in MonoItem::Static.
michaelwoerister Feb 19, 2018
8ff633c
Implement describe_def query for LOCAL_CRATE
michaelwoerister Feb 19, 2018
1be7f96
Rename is_translated_fn query to is_translated_item and make it suppo…
michaelwoerister Feb 19, 2018
89b3ef3
Allow for instantiating statics from upstream crates.
michaelwoerister Feb 19, 2018
1aad320
When encountering invalid token after `unsafe`, mention `{`
estebank Feb 19, 2018
713b05f
rustc_data_structures: add missing #[inline].
eddyb Feb 21, 2018
1eab1b1
support unit tests with return values that implement `Terminaton`
nikomatsakis Feb 8, 2018
0625d4c
begin crate-relative paths with `crate`
nikomatsakis Feb 11, 2018
e446f70
put the "unit test" logic into libtest
nikomatsakis Feb 14, 2018
5f1e78f
move Termination trait to std::process
nikomatsakis Feb 22, 2018
8f35141
remove tokenstream
nikomatsakis Feb 22, 2018
067c2e3
handle `#[bench]` functions better
nikomatsakis Feb 23, 2018
e0ed88d
add test for `fn main() -> !`
nikomatsakis Feb 23, 2018
a0562ec
delete this test file: it also appears as
nikomatsakis Feb 23, 2018
0a5f4ae
move test to the proper directory and test #[bench]
nikomatsakis Feb 23, 2018
068e383
update test -- we now give a slightly different error
nikomatsakis Feb 23, 2018
10f7c11
re-export `assert_test_result` for use when testing libtest itself
nikomatsakis Feb 23, 2018
380e388
do not run MIR type checker twice
nikomatsakis Feb 7, 2018
2370b60
update tests and reference files
nikomatsakis Feb 22, 2018
bcd9968
explain why we don't need to run type-checker when NLL is enabled
nikomatsakis Feb 23, 2018
25ec810
Rollup merge of #47987 - Zoxc:rm-recursion-checking, r=eddyb
Manishearth Feb 24, 2018
a79e5e2
Rollup merge of #48084 - cramertj:impl-trait-errors, r=nikomatsakis
Manishearth Feb 24, 2018
b52b33a
Rollup merge of #48143 - nikomatsakis:termination_trait_in_tests, r=e…
Manishearth Feb 24, 2018
e966993
Rollup merge of #48185 - michaelwoerister:recursive-cache-decoding, r…
Manishearth Feb 24, 2018
111af8f
Rollup merge of #48206 - michaelwoerister:colors-array, r=nikomatsakis
Manishearth Feb 24, 2018
8fdad6f
Rollup merge of #48232 - fpoli:master, r=pnkfelix
Manishearth Feb 24, 2018
387d177
Rollup merge of #48246 - estebank:ice, r=nikomatsakis
Manishearth Feb 24, 2018
b3f85fd
Rollup merge of #48258 - nrc:save-proc-nested, r=eddyb
Manishearth Feb 24, 2018
a1a1409
Rollup merge of #48317 - ExpHP:unused-unsafe-is-no-fn, r=estebank
Manishearth Feb 24, 2018
2483d84
Rollup merge of #48353 - michaelwoerister:monoitem-static-defid, r=eddyb
Manishearth Feb 24, 2018
fc7caed
Rollup merge of #48356 - estebank:unsafe-without-braces, r=nikomatsakis
Manishearth Feb 24, 2018
6ec5dc3
Rollup merge of #48402 - eddyb:y-u-no-inline, r=nikomatsakis
Manishearth Feb 24, 2018
182f882
Rollup merge of #48061 - nikomatsakis:nll-do-not-run-mir-typeck-twice…
Manishearth Feb 24, 2018
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
save-analysis: power through bracket mis-counts
Closes #47981 This is pretty unsatisfying since it is working around a span bug. However, I can't track down the span bug and it could be in the parser, proc macro expansion, the user macro, or Syn (or any other library that can manipulate spans). Given that user code can cause this error, I think we need to be more robust here.
  • Loading branch information
Nick Cameron committed Feb 16, 2018
commit 10fbdb832b2ad5807b89a005f9d4bccaec231fb1
26 changes: 14 additions & 12 deletions src/librustc_save_analysis/span_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl<'a> SpanUtils<'a> {
// We keep track of the following two counts - the depth of nesting of
// angle brackets, and the depth of nesting of square brackets. For the
// angle bracket count, we only count tokens which occur outside of any
// square brackets (i.e. bracket_count == 0). The intutition here is
// square brackets (i.e. bracket_count == 0). The intuition here is
// that we want to count angle brackets in the type, but not any which
// could be in expression context (because these could mean 'less than',
// etc.).
Expand Down Expand Up @@ -151,18 +151,20 @@ impl<'a> SpanUtils<'a> {
}
prev = next;
}
if angle_count != 0 || bracket_count != 0 {
let loc = self.sess.codemap().lookup_char_pos(span.lo());
span_bug!(
span,
"Mis-counted brackets when breaking path? Parsing '{}' \
in {}, line {}",
self.snippet(span),
loc.file.name,
loc.line
);
#[cfg(debug_assertions)] {
if angle_count != 0 || bracket_count != 0 {
let loc = self.sess.codemap().lookup_char_pos(span.lo());
span_bug!(
span,
"Mis-counted brackets when breaking path? Parsing '{}' \
in {}, line {}",
self.snippet(span),
loc.file.name,
loc.line
);
}
}
if result.is_none() && prev.tok.is_ident() && angle_count == 0 {
if result.is_none() && prev.tok.is_ident() {
return Some(prev.sp);
}
result
Expand Down