varkor
510a9fffa2
Fix irrefutable matches on integer ranges
2018-12-11 11:16:53 +00:00
Oliver Scherer
8d0b64f16d
Make const unsafe fn bodies unsafe
2018-12-11 10:27:00 +01:00
Guillaume Gomez
a11de4171c
Rollup merge of #56661 - aelred:issue-55846, r=Mark-Simulacrum
...
Add regression test for ICE
Fixes #55846 with a minimal (or as best as I can manage) test case. I tested this against 1.30.0 manually to confirm it crashes.
The issue seemed to have something to do with associated types. It's possible someone with more knowledge can shrink the test case down further, or make it clearer.
2018-12-10 22:02:02 +01:00
Guillaume Gomez
b37ad661c7
Rollup merge of #56641 - GuillaumeGomez:span-trait-method-invalid-nb-parameters, r=estebank
...
fix span for invalid number of parameters in trait method
Fixes #56582 .
2018-12-10 22:02:00 +01:00
Guillaume Gomez
dec7b19516
Rollup merge of #56491 - euclio:assert-error, r=estebank
...
emit error with span for empty asserts
Fixes #55547 .
2018-12-10 22:01:57 +01:00
Andy Russell
7f7045f847
improve diagnostics for invalid external docs
2018-12-10 12:34:46 -05:00
Andy Russell
c3c2de964d
reject invalid external doc attributes
...
Also, provide a suggestion for the correct syntax.
2018-12-10 12:34:46 -05:00
Oliver Scherer
8a9414ae19
Add a few more tests of edge cases
2018-12-10 16:34:44 +01:00
Felix Chapman
90b8131abc
Add regression test for issue #55846
2018-12-10 02:49:19 +00:00
aheart
aa0428570e
Add lint for items deprecated in future
2018-12-09 20:58:20 +02:00
Vadim Petrochenkov
44fe586060
Fix rebase + Add missing // force-host
2018-12-09 21:10:19 +03:00
Vadim Petrochenkov
725d22e645
Move some tests from ui-fulldeps to ui
2018-12-09 19:56:30 +03:00
Vadim Petrochenkov
4c9c70af38
Move former compile-fail-fulldeps tests to ui
2018-12-09 19:56:30 +03:00
Nikita Popov
706e67b0a0
Bump minimum required LLVM version to 6.0
2018-12-09 12:05:40 +01:00
bors
8db23425a3
Auto merge of #56616 - estebank:issue-56539, r=davidtwco
...
Encode `TraitAlias` as if they were `Trait`
Fix #56539 .
2018-12-08 19:34:43 +00:00
Guillaume Gomez
05cea31c8d
fix span for invalid number of parameters in trait method
2018-12-08 20:04:14 +01:00
Mazdak Farrokhzad
9f7f949600
Rollup merge of #56620 - petrochenkov:noclutter, r=estebank
...
resolve: Reduce some clutter in import ambiguity errors
Noticed in https://www.reddit.com/r/rust/comments/a3pyrw/announcing_rust_131_and_rust_2018/eb8alhi/ .
The first error is distracting, but unnecessary, it's a *consequence* of the ambiguity error and appears because one of the ambiguous `actix` modules (unsurprisingly) doesn't have the expected name in it.
2018-12-08 08:43:49 +01:00
Mazdak Farrokhzad
ac15b4f4bd
Rollup merge of #56248 - estebank:suggest-bare-pub, r=petrochenkov
...
Suggest an appropriate token when encountering `pub Ident<'a>`
Fix #55403 . Follow up to #45997 .
2018-12-08 08:43:43 +01:00
Alexander Regueiro
003c5b796e
Fixed nll stderr file.
2018-12-08 03:17:54 +00:00
Vadim Petrochenkov
2010b4f60b
resolve: Reduce some clutter in import ambiguity errors
2018-12-08 04:19:29 +03:00
Alexander Regueiro
4d95f5b46d
Fixed test stderr files.
2018-12-07 23:53:34 +00:00
Alexander Regueiro
ee89c088b0
Various minor/cosmetic improvements to code
2018-12-07 23:53:34 +00:00
Esteban Küber
14cca296c5
Encode TraitAlias as if they were Trait
2018-12-07 14:52:44 -08:00
John Ginger
c0e3f4b8bb
Change to give a help message
2018-12-07 14:15:36 +00:00
David Wood
4a286d33f9
Fix ICE in region naming.
...
This commit puts a fix in place for the ICE in region naming code so
that it doesn't break the compiler. However, this results in the
diagnostic being poorer as the borrow explanation that was causing the
ICE is not being added - this should be fixed as a follow-up.
2018-12-07 14:45:30 +01:00
David Wood
7fcf31b181
Add suggestion for underscore binding fix.
...
This commit emits a suggestion for adding an underscore binding to
arguments in trait methods that previously did not have a argument name
specified.
2018-12-07 12:02:41 +01:00
David Wood
e4dc15a969
Add context for RFC 1685 change in 2018 edition.
...
This commit adds a note providing context for the change to argument
names being required in the 2018 edition for trait methods.
2018-12-07 11:56:56 +01:00
Vadim Petrochenkov
8ab115c21d
Unsupport #[derive(Trait)] sugar for #[derive_Trait] legacy plugin attributes
2018-12-07 03:30:01 +03:00
bors
4bb5d35659
Auto merge of #56392 - petrochenkov:regensym, r=oli-obk
...
Delay gensym creation for "underscore items" (`use foo as _`/`const _`) until name resolution
So they cannot be cloned by macros. See https://github.com/rust-lang/rust/pull/56303 for the discussion.
Mostly fix cross-crate use of underscore items by inverting the "gensyms are lost in metadata" bug as described in https://github.com/rust-lang/rust/pull/56303#issuecomment-442464695 .
Fix unused import warnings for single-segment imports (first commit) and `use crate_name as _` imports (as specified in https://github.com/rust-lang/rust/pull/56303#issuecomment-442274118 ).
Prohibit accidentally implemented `static _: TYPE = EXPR;` (cc https://github.com/rust-lang/rust/pull/55983 ).
Add more tests for `use foo as _` imports.
2018-12-06 15:08:11 +00:00
David Wood
1149c58bb8
Add test for #46589 .
...
This commit adds the test for writing into a projection of a local to
confirm there are no remaining borrows.
2018-12-06 15:47:30 +01:00
bors
367e783e6f
Auto merge of #56557 - pietroalbini:rollup, r=pietroalbini
...
Rollup of 11 pull requests
Successful merges:
- #56315 (Rustdoc inline macro reexport)
- #56332 ([rustdoc] Specific crate search)
- #56362 (Stabilise exhaustive integer patterns)
- #56426 (libsyntax_pos: A few tweaks)
- #56441 (rustbuild: Fix issues with compiler docs)
- #56446 (pass the parameter environment to `traits::find_associated_item`)
- #56500 (cleanup: remove static lifetimes from consts)
- #56525 (Avoid extra copy and syscall in std::env::current_exe)
- #56528 (Remove unused dependency (rustc_lint -> rustc_mir))
- #56548 (Optimized string FromIterator + Extend impls)
- #56553 (Don't print the profiling summary to stdout when -Zprofile-json is set)
Failed merges:
r? @ghost
2018-12-06 12:41:30 +00:00
bors
128a1fa4e1
Auto merge of #55635 - oli-obk:min_const_unsafe_fn, r=nikomatsakis
...
Allow calling `const unsafe fn` in `const fn` behind a feature gate
cc #55607
r? @Centril
2018-12-06 10:18:17 +00:00
Pietro Albini
0aa72ad55d
Rollup merge of #56426 - petrochenkov:syntweak, r=nikomatsakis
...
libsyntax_pos: A few tweaks
2018-12-06 07:48:53 +01:00
Pietro Albini
e57ed0ddab
Rollup merge of #56362 - varkor:stabilise-exhaustive-integer-patterns, r=nikomatsakis
...
Stabilise exhaustive integer patterns
This is dependent on the FCP for https://github.com/rust-lang/rfcs/pull/2591 being completed, but that should happen tomorrow, so there's little harm in opening this PR early.
Closes #50907 .
2018-12-06 07:48:52 +01:00
Pietro Albini
1276ffeba2
Rollup merge of #56456 - oli-obk:private_impl_trait, r=cramertj
...
Handle existential types in dead code analysis
fixes #55124
r? @cramertj
2018-12-05 23:54:32 +01:00
Pietro Albini
b2a002dc4b
Rollup merge of #56372 - wildarch:issue-55314-second-borrow-ref, r=davidtwco
...
Refer to the second borrow as the "second borrow" in E0501.rs
Fixes #55314 .
r? @davidtwco
2018-12-05 23:54:27 +01:00
varkor
ed64b1927b
Fix precise_pointer_size_matching tests on all platforms
2018-12-05 23:21:56 +01:00
bors
21cb46a6e9
Auto merge of #55922 - oli-obk:slice_pat_ice, r=zackmdavis
...
Fix ICE in `const` slice patterns
fixes #55911
based on https://github.com/rust-lang/rust/pull/55915
New commits start at eabc1551e0d0953f1951020afb5919ab4c129cf5
2018-12-05 07:16:17 +00:00
bors
b3af09205b
Auto merge of #56486 - matthewjasper:propagate-all-closure-bounds, r=pnkfelix
...
Propagate all closure requirements to the caller
Closes #56477
This should be backported to 1.32 if it doesn't make the cut.
r? @pnkfelix
cc @nikomatsakis
2018-12-04 20:56:11 +00:00
Andy Russell
a367cec6e3
emit error with span for empty asserts
...
Fixes #55547 .
2018-12-04 10:22:48 -05:00
Oliver Scherer
f4115765c5
Intrinsic checks are just needed for qualify_min_const_fn
2018-12-04 10:17:37 +01:00
Oliver Scherer
ae0b00cada
Add and update tests
2018-12-04 10:17:37 +01:00
Oliver Scherer
37ef5e43af
Add tests for stable unsafe features in const fn
2018-12-04 10:17:37 +01:00
Oliver Scherer
4497ff3762
Emit feature gate suggestion
2018-12-04 10:17:36 +01:00
Oliver Scherer
55abc0bc90
Also prevent mutation fields directly
2018-12-04 10:17:36 +01:00
Oliver Scherer
1894a5fe2c
Also make immutable references to non-freeze restricted value range types unsafe
2018-12-04 10:17:36 +01:00
Oliver Scherer
081c49783f
generalize the message about the creation of layout restricted types
2018-12-04 10:17:36 +01:00
Oliver Scherer
14218e3969
Trailing newlines again
2018-12-04 10:17:36 +01:00
Oliver Scherer
8bdb11c4d9
Forbid the creation of mutable borrows to fields of layout constrained types
2018-12-04 10:17:36 +01:00
Oliver Scherer
02b22323f1
Make sure the initialization of constrained int range newtypes is unsafe
2018-12-04 10:17:36 +01:00