Mazdak Farrokhzad
0b7d8f99ed
Rollup merge of #57477 - euclio:clarify-lev-suggestion, r=zackmdavis
...
clarify resolve typo suggestion
Include the kind of the binding that we're suggesting, and use a
structured suggestion.
Fixes #53445 .
2019-01-14 11:31:53 +01:00
bors
2fadb0a16c
Auto merge of #51487 - Zoxc:incr-passes, r=michaelwoerister
...
Make more passes incremental
r? @michaelwoerister
2019-01-13 19:43:46 +00:00
Vadim Petrochenkov
805099cf3e
hygiene: Do not treat Self ctor as a local variable
2019-01-13 02:18:53 +03:00
John Kåre Alsaker
468254b38f
Update tests
2019-01-11 03:53:30 +01:00
Andy Russell
404ad50d14
clarify resolve typo suggestion
...
Include the kind of the binding that we're suggesting, and use a
structured suggestion.
2019-01-09 14:11:00 -05:00
Corey Farwell
d2c91a1a6d
Fix broken links to second edition TRPL.
...
Fixes https://github.com/rust-lang/rust/issues/57104 .
2019-01-01 12:53:07 -05:00
Mark Rousskov
2a663555dd
Remove licenses
2018-12-25 21:08:33 -07:00
Andy Russell
6474de904c
make non_camel_case_types an early lint
2018-12-24 12:58:52 -05:00
Alexander Regueiro
ee89c088b0
Various minor/cosmetic improvements to code
2018-12-07 23:53:34 +00:00
Oliver Scherer
61efc3b71b
Update tests
2018-12-04 10:06:05 +01:00
Alexander Regueiro
d609fdf775
Updated ui tests.
2018-11-30 22:12:39 +00:00
bors
9e8a982a23
Auto merge of #56051 - pietroalbini:rollup, r=pietroalbini
...
Rollup of 25 pull requests
Successful merges:
- #55562 (Add powerpc- and powerpc64-unknown-linux-musl targets)
- #55564 (test/linkage-visibility: Ignore on musl targets)
- #55827 (A few tweaks to iterations/collecting)
- #55834 (Forward the ABI of the non-zero sized fields of an union if they have the same ABI)
- #55857 (remove unused dependency)
- #55862 (in which the E0618 "expected function" diagnostic gets a makeover)
- #55867 (do not panic just because cargo failed)
- #55894 (miri enum discriminant handling: Fix treatment of pointers, better error when it is undef)
- #55916 (Make miri value visitor useful for mutation)
- #55919 (core/tests/num: Simplify `test_int_from_str_overflow()` test code)
- #55923 (reword #[test] attribute error on fn items)
- #55949 (ty: return impl Iterator from Predicate::walk_tys)
- #55952 (Update to Clang 7 on CI.)
- #55953 (#53488 Refactoring UpvarId)
- #55962 (rustdoc: properly calculate spans for intra-doc link resolution errors)
- #55963 (Stress test for MPSC)
- #55968 (Clean up some non-mod-rs stuff.)
- #55970 (Miri backtrace improvements)
- #56007 (CTFE: dynamically make sure we do not call non-const-fn)
- #56011 (Replace data.clone() by Arc::clone(&data) in mutex doc.)
- #56012 (avoid shared ref in UnsafeCell::get)
- #56016 (Add VecDeque::resize_with)
- #56027 (docs: Add missing backtick in object_safety.rs docs)
- #56043 (remove "approx env bounds" if we already know from trait)
- #56059 (Increase `Duration` approximate equal threshold to 1us)
2018-11-19 14:07:45 +00:00
Vadim Petrochenkov
4fc3c13e32
resolve: Avoid sentence breaks in diagnostics
2018-11-18 13:58:36 +03:00
Zack M. Davis
f3e9b1a703
in which the E0618 "expected function" diagnostic gets a makeover
...
Now the main span focuses on the erroneous not-a-function callee,
while showing the entire call expression is relegated to a secondary
span. In the case where the erroneous callee is itself a call, we
point out the definition, and, if the call expression spans multiple
lines, tentatively suggest a semicolon (because we suspect that the
"outer" call is actually supposed to be a tuple).
The new `bug!` assertion is, in fact, safe (`confirm_builtin_call` is
only called by `check_call`, which is only called with a first arg of
kind `ExprKind::Call` in `check_expr_kind`).
Resolves #51055 .
2018-11-10 22:12:33 -08:00
Alexander Regueiro
4751953d5f
Added tests.
2018-11-03 04:09:34 +00:00
Vadim Petrochenkov
c57f0a7201
resolve: Desugar empty import groups into synthetic dummy imports
...
so that they are correctly resolved on 2018 edition
2018-10-28 03:06:38 +03:00
Vadim Petrochenkov
acdbd0643c
resolve: More precise spans for privacy errors
2018-10-28 02:56:12 +03:00
Matthias Krüger
4972beaf65
fix typos in various places
2018-10-23 15:56:25 +02:00
François Mockers
9eacd68a49
manage cases with tabs or other whitespaces
2018-10-21 00:23:29 +02:00
François Mockers
2ba567fc27
fix other tests failing due to change in case or new suggestion for extern crate
2018-10-17 01:21:40 +02:00
François Mockers
cac95ee11c
#45829 when a renamed import conflict with a previous import
2018-10-16 08:22:32 +02:00
Donato Sciarra
b7248d5988
Fix internal compiler error on malformed match arm pattern.
...
Issue: 54379
2018-10-07 13:14:21 +02:00
Donato Sciarra
0390736dce
Improve ux when calling associated functions with dot notation
...
Issue: 22692
2018-09-29 21:36:58 +02:00
Julian Kulesh
b8a7c6f5b6
Improve error message for E0424
2018-09-23 05:35:42 +03:00
F001
a489169912
implement feature tuple_struct_self_ctor
2018-09-13 10:57:28 +08:00
Esteban Küber
008aa5a24e
Provide more context for unenclosed delimiters
...
* When encountering EOF, point at the last opening brace that does not
have the same indentation level as its close delimiter.
* When encountering the wrong type of close delimiter, point at the
likely correct open delimiter to give a better idea of what went
wrong.
2018-09-05 03:43:24 -07:00
Esteban Küber
5238b523c3
Reword un-closed delimiter label
2018-09-05 03:43:24 -07:00
Vadim Petrochenkov
c56adf6413
cleanup: Add main functions to some UI tests
2018-08-31 18:56:15 +03:00
Masaki Hara
e2b95cb70e
Lift some Sized checks.
2018-08-19 08:07:33 +09:00
Esteban Küber
1b5e29ae6f
Do not emit "incorrect close delimiter" twice in the same place
2018-08-15 14:26:03 -07:00
Esteban Küber
2a74d7924a
Tweak unclosed delimiter parser error
2018-08-15 13:18:34 -07:00
David Wood
3fc7ab2373
Merged migrated compile-fail tests and ui tests. Fixes #46841 .
2018-08-14 11:12:09 +02:00
Felix Rabe
c74415872c
Fix doc link (again)
...
Similar to #52404 . The link for comparison:
- https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized (broken)
- https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait (correct, stable 2nd ed)
- https://doc.rust-lang.org/nightly/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait (correct, nightly 2nd ed)
- https://doc.rust-lang.org/nightly/book/2018-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait (correct, nightly 2018 ed)
This commit is the result of (first) searching via ripgrep (0.8.1 -SIMD -AVX):
rg -l dynamically-sized-types-and-sized
and then replacing all relevant occurrences via:
find src/{libcore,test/ui} -type f -print0 | xargs -0 sed -i.bak \
s/dynamically-sized-types-and-sized/dynamically-sized-types-and-the-sized-trait/g
find src/{libcore,test/ui} -type f -name '*.bak' -print0 | xargs -0 rm
(Note: Tested on on macOS 10.13 (BSD). `sed -i.bak` should work on Linux
(GNU sed) as well, but not tested.)
2018-08-05 07:52:29 +02:00
Felix Rabe
88e9af0375
Fix doc link
...
The link for comparison:
- https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized (broken)
- https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized (fixed)
This commit is the result of (first) searching via:
find src -type f -print0 | xargs -0 fgrep -l dynamically-sized-types--sized
and then replacing all relevant occurrences via:
find src/{libcore,test/ui} -type f -print0 | xargs -0 sed -i.bak \
s/dynamically-sized-types--sized/dynamically-sized-types-and-sized/g
find src/{libcore,test/ui} -type f -name '*.bak' -print0 | xargs -0 rm
(Note: Commands run on macOS 10.13 (BSD). `sed -i.bak` should work on
GNU/Linux as well, but not tested.)
2018-07-17 14:10:11 +02:00
Rémy Rakic
b8c96ce530
Fix typo in error message E0277
2018-07-10 23:10:13 +02:00
Zack M. Davis
4b1808578a
add dyn to display of dynamic (trait) type names
...
The `dyn Trait` syntax was stabilized in 199ee327 . Resolves #49277 .
2018-06-23 18:10:25 -07:00
Esteban Küber
d4bfae1319
Update message for !Sized types
2018-06-19 17:32:33 -07:00
Esteban Küber
f1dee43887
Add link to book for Sized errors
2018-06-19 15:19:15 -07:00
Esteban Küber
776544f011
Add message to rustc_on_unimplemented attributes in core
2018-06-19 15:19:13 -07:00
Crazycolorz5
c1df62a760
Add closing bracket expectation to sequences, modified appropriate test cases.
2018-06-01 10:05:46 -04:00
John Kåre Alsaker
9cbe3b749d
Update tests
2018-04-16 23:30:36 +02:00
John Kåre Alsaker
b1d872b38e
Update tests
2018-03-16 11:52:46 +01:00
Eric Huss
6aa4dcb9cf
Add empty main() to tests where it is missing.
2018-03-14 12:23:28 -07:00
Eric Huss
b4b7ccbd1c
Add crate name to "main function not found" error message.
...
Fixes #44798 and rust-lang/cargo#4948 .
2018-03-14 11:40:13 -07:00
Guillaume Gomez
2e104a77cf
update tests
2018-03-14 00:53:24 +01:00
Esteban Küber
36baa81be9
Add label to primary span in some parse errors
2018-02-27 10:47:33 -08:00
Vadim Petrochenkov
7ba5fd168a
Update UI tests
2018-02-26 20:24:42 +03:00
Vadim Petrochenkov
fa2d9fc4b9
Update UI tests
2018-02-26 20:24:02 +03:00
Guillaume Gomez
5747fd6611
Update ui tests
2018-02-25 12:15:05 +01:00
John Kåre Alsaker
46a3f2fa18
Change error message for E0391 to "cyclic dependency detected"
2018-02-10 03:28:15 +01:00