Commit Graph

96872 Commits

Author SHA1 Message Date
Yuki Okushi
18dceabc95 Add tests for issue-58887 2019-07-21 15:27:23 +09:00
bors
1301422a6c Auto merge of #60913 - spastorino:place2_4, r=oli-obk
Place 2.0 change from enum to struct

r? @oli-obk
2019-07-21 03:25:05 +00:00
Samy Kacimi
60ca55cbda
normalize use of backticks in compiler messages for librustc_incremental
https://github.com/rust-lang/rust/issues/60532
2019-07-20 20:57:45 +02:00
David Wood
44bf6b6f55
tests: Add minimal reproduction of #61963.
This commit adds a reproduction of the error reported in servo which
demonstrates the current, incorrect behaviour.

Co-authored-by: Rémy Rakić <remy.rakic@gmail.com>
2019-07-20 19:17:26 +01:00
Aleksey Kladov
395ee0b79f Introduce rustc_lexer
The idea here is to make a reusable library out of the existing
rust-lexer, by separating out pure lexing and rustc-specific concerns,
like spans, error reporting an interning.

So, rustc_lexer operates directly on `&str`, produces simple tokens
which are a pair of type-tag and a bit of original text, and does not
report errors, instead storing them as flags on the token.
2019-07-20 21:12:34 +03:00
Nikita Popov
6fae7db65d Remove vector fadd/fmul reduction workarounds
The bugs that this was working around have been fixed in LLVM 9.
2019-07-20 18:49:50 +02:00
Nikita Popov
b9784b18c2 Don't link mcjit/interpreter LLVM components 2019-07-20 17:17:48 +02:00
bjorn3
93de733f02 Remove tests for -Zlower-128bit-ops 2019-07-20 14:38:50 +02:00
bors
95b1fe560d Auto merge of #62789 - GuillaumeGomez:update-pulldown-cmark, r=Manishearth
Update pulldown-cmark version

Fixes https://github.com/rust-lang/rust/issues/62571.
Fixes #62770.
Fixes #62552.

cc @rust-lang/rustdoc @Centril @pietroalbini
2019-07-20 12:21:28 +00:00
Ralf Jung
2e6b13a649 references must be aligned; also move up the warning that fn ptrs must be non-NULL 2019-07-20 13:20:08 +02:00
Ralf Jung
21b502b275 warn that raw pointers must be aligned when used, and that writes cause drop 2019-07-20 13:19:36 +02:00
bjorn3
e8a1e73ff5 Update compiler_builtins to 0.1.18 2019-07-20 11:27:13 +02:00
Guillaume Gomez
9d6b29af5a Update pulldown-cmark version 2019-07-20 11:01:04 +02:00
bors
f69b07144a Auto merge of #62710 - estebank:bad-named-args, r=petrochenkov
Specific error for positional args after named args in `format!()`

When writing positional arguments after named arguments in the
`format!()` and `println!()` macros, provide a targeted diagnostic.

Follow up to https://github.com/rust-lang/rust/pull/57522/files#r247278885
2019-07-20 06:18:52 +00:00
Saleem Jaffer
fd352b02e1 alters the panic variant of InterpError 2019-07-20 11:48:16 +05:30
Santiago Pastorino
a8ceeeb5a0 Avoid cloning Place in check_and_patch 2019-07-20 05:08:39 +02:00
Santiago Pastorino
b59ded8ae0 Avoid cloning Place in visit_rvalue 2019-07-20 05:08:39 +02:00
Santiago Pastorino
7789cbf700 Avoid cloning Place in assign #2 2019-07-20 05:08:39 +02:00
Santiago Pastorino
b490032893 Avoid cloning Place in assign #1 2019-07-20 05:08:39 +02:00
Santiago Pastorino
2a7d600ee0 Avoid cloning Place in in_projection_structurally 2019-07-20 05:08:39 +02:00
Santiago Pastorino
7b456df4ab Avoid cloning Place in is_stable 2019-07-20 05:08:39 +02:00
Santiago Pastorino
17a465cb85 Avoid unneeded else branches 2019-07-20 05:08:39 +02:00
Santiago Pastorino
9b549d3c9d Avoid cloning Place in gather_init 2019-07-20 05:08:39 +02:00
Santiago Pastorino
d77653e88b Avoid cloning Place in calculate_fake_borrows 2019-07-20 05:08:39 +02:00
Santiago Pastorino
2ffd3c64f9 Avoid cloning Place in limit_capture_mutability 2019-07-20 05:08:39 +02:00
Santiago Pastorino
10470797a6 Avoid cloning Place in report_cannot_move_from_borrowed_content 2019-07-20 05:08:39 +02:00
Santiago Pastorino
09014fc793 Avoid cloning Place in report_cannot_move_from_static 2019-07-20 05:08:39 +02:00
Santiago Pastorino
95e727a5c3 Avoid cloning Place in check_access_permissions 2019-07-20 05:08:39 +02:00
Santiago Pastorino
34e3b7076c Avoid cloning Place in append_place_to_string 2019-07-20 05:08:39 +02:00
Santiago Pastorino
72251d5595 Avoid cloning Place in classify_drop_access_kind 2019-07-20 05:08:39 +02:00
Santiago Pastorino
75c0c8c6dc Avoid cloning Place in describe_place_for_conflicting_borrow 2019-07-20 05:08:39 +02:00
Santiago Pastorino
46f81fc53d Avoid cloning Place in report_use_of_moved_or_uninitialized and friends 2019-07-20 05:08:39 +02:00
Santiago Pastorino
ec65db07ef Remove explicit lifetime 2019-07-20 05:08:39 +02:00
Santiago Pastorino
17953185f8 Remove explicit return from last line of fn 2019-07-20 05:08:38 +02:00
Santiago Pastorino
438aeb8ca3 Avoid cloning Place in codegen_place 2019-07-20 05:08:38 +02:00
Santiago Pastorino
e11adb13b6 Implement Place::as_place_ref 2019-07-20 05:08:38 +02:00
Santiago Pastorino
98d2324875 Avoid cloning place in LocalAnalyzer visitor 2019-07-20 05:08:38 +02:00
Santiago Pastorino
d0accade3e Migrate from Place enum to Place struct 2019-07-20 05:08:38 +02:00
bors
e9d2227328 Auto merge of #62008 - ia0:issues_61053, r=petrochenkov
Add meta-variable checks in macro definitions

This is an implementation of #61053. It is not sound (some errors are not reported) and not complete (reports may not be actual errors). This is due to the possibility to define macros in macros in indirect ways. See module documentation of `macro_check` for more details.

What remains to be done:
- [x] Migrate from an error to an allow-by-default lint.
- [x] Add more comments in particular for the handling of nested macros.
- [x] Add more tests if needed.
- [x] Try to avoid cloning too much (one idea is to use lists on the stack).
- [ ] Run crater with deny-by-default lint (measure rate of false positives).
    - [ ] Remove extra commit for deny-by-default lint
- [x] Create a PR to remove the old `question_mark_macro_sep` lint #62160
2019-07-20 02:39:04 +00:00
Esteban Küber
2641beddc4 Tweak span for variant not found error 2019-07-19 19:25:03 -07:00
John Kåre Alsaker
0e73386a66 Use sharded maps for interning 2019-07-19 23:37:48 +02:00
bors
5c26b52368 Auto merge of #62705 - petrochenkov:oh-bye-mark, r=matthewjasper
libsyntax: Rename `Mark` into `ExpnId`

"`Mark`" is an ID that identifies both a macro invocation (`foo!()`), and expansion process, and expansion result of that macro invocation.
The problem is that it's pretty hard to infer that from its name.

This PR renames it into `ExpnId` reflecting its meaning in most contexts.
(The contexts where it's meaning is closer to "macro invocation ID" are rarer.)

I've kept "mark" in the names of functions that add or remove marks to/from syntactic contexts, those marks are not just expansion IDs, but something more complex.
2019-07-19 21:11:23 +00:00
Samy Kacimi
19a848d2ea
normalize use of backticks in compiler messages for librustc_metadata
https://github.com/rust-lang/rust/issues/60532
2019-07-19 22:24:56 +02:00
Denys Otrishko
c6e027de52
fixup! rustc_typeck: improve diagnostics for _ const/static declarations 2019-07-19 23:20:51 +03:00
Denys Otrishko
b3618648f2
fixup! rustc_typeck: improve diagnostics for _ const/static declarations 2019-07-19 21:59:54 +03:00
Esteban Küber
9dbe2e77b3 review comments 2019-07-19 11:36:55 -07:00
Julien Cretin
6ec4584d84 Implement checks for meta-variables in macros 2019-07-19 19:59:12 +02:00
Julien Cretin
82abc0db81 Remember the span of the Kleene operator in macros
This is needed for having complete error messages where reporting macro variable
errors. Here is what they would look like:

error: meta-variable repeats with different kleene operator
  --> $DIR/issue-61053-different-kleene.rs:3:57
   |
LL |     ( $( $i:ident = $($j:ident),+ );* ) => { $( $( $i = $j; )* )* };
   |                                 - expected repetition   ^^   - conflicting repetition
2019-07-19 19:59:11 +02:00
Esteban Küber
f5b285906e Handle more cases of typos misinterpreted as type ascription 2019-07-19 10:56:37 -07:00
CrLF0710
10d415938e Revert "Disable stack probing for gnux32."
This reverts commit 42d652ecd6.
2019-07-20 01:29:47 +08:00