| Age | Commit message (Collapse) | Author | Lines |
|
HirId-ify intravisit
A big step towards https://github.com/rust-lang/rust/pull/57578.
This affects mostly `hir::{collector, intravisit}` and `rustc::lint`.
|
|
Add expected/provided byte alignments to validation error message
Fixes #58617
|
|
Update tests to account for cross-platform testing and miri.
Fix #23926
|
|
Special suggestion for illegal unicode curly quote pairs
Fixes #58436
Did not end up expanding the error message span to include the full string literal since I figured the start of the token was the issue, while the help suggestion span would include up to the closing quotation mark.
The look ahead logic does not affect the reader position, not sure if that is an issue (if eg it should still continue to parse after the closing quote without erroring out).
|
|
Check the Self-type of inherent associated constants
r? @arielb1
|
|
Add better error message for partial move
closes #56657
r? @davidtwco
|
|
|
|
|
|
|
|
|
|
AFAICT, we do not have the same const-eval issues that we used to when
rust-lang/rust#23926 was filed. (Probably because of the switch to
miri for const-evaluation.)
|
|
huge-array-simple.rs test.
(and now unignore the test since it shouldn't break tests of
cross-compiles anymore.)
|
|
Add a note about 2018e if someone uses `try {` in 2015e
Inspired by https://github.com/rust-lang/rust/issues/58491, where a `try_blocks` example was accidentally run in 2015, which of course produces a bunch of errors.
What's the philosophy about gating for this? The keyword is stably a keyword in 2018, so I haven't gated it for now but am not mentioning what the keyword _does_. Let me know if I should do differently.
Resolves #53672
|
|
igorsdv:suggest-removing-parentheses-surrounding-lifetimes, r=estebank
Suggest removing parentheses surrounding lifetimes
Fixes #57386.
r? @estebank
|
|
deprecate before_exec in favor of unsafe pre_exec
Fixes https://github.com/rust-lang/rust/issues/39575
As per the [lang team decision](https://github.com/rust-lang/rust/issues/39575#issuecomment-442993358):
> The language team agreed that before_exec should be unsafe, and leaves the details of a transition plan to the libs team.
Cc @alexcrichton @rust-lang/libs how would you like to proceed?
|
|
Erroneous loop diagnostic in nll
Closes #53773
r? @nikomatsakis
|
|
This preserves the error you currently get on stable for the
old-lub-glb-object.rs test.
|
|
One surprise: old-lub-glb-object.rs, may indicate a bug
|
|
|
|
make generalization code create new variables in correct universe
In our type inference system, when we "generalize" a type T to become
a suitable value for a type variable V, we sometimes wind up creating
new inference variables. So, for example, if we are making V be some
subtype of `&'X u32`, then we might instantiate V with `&'Y u32`.
This generalized type is then related `&'Y u32 <: &'X u32`, resulting
in a region constriant `'Y: 'X`. Previously, however, we were making
these fresh variables like `'Y` in the "current universe", but they
should be created in the universe of V. Moreover, we sometimes cheat
in an invariant context and avoid creating fresh variables if we know
the result must be equal -- we can only do that when the universes
work out.
Fixes #57843
r? @pnkfelix
|
|
|
|
This commit fixes the logic of detecting when a use happen in a later
iteration of where a borrow was defined
Fixes #53773
|
|
Rollup of 24 pull requests
Successful merges:
- #56470 (Modify doctest's auto-`fn main()` to allow `Result`s)
- #58044 (Make overflowing and wrapping negation const)
- #58303 (Improve stability tags display)
- #58336 (Fix search results interactions)
- #58384 (Fix tables display)
- #58392 (Use less explicit shifting in std::net::ip)
- #58409 (rustdoc: respect alternate flag when formatting impl trait)
- #58456 (Remove no longer accurate diagnostic code about NLL)
- #58528 (Don't use an allocation for ItemId in StmtKind)
- #58530 (Monomorphize less code in fs::{read|write})
- #58534 (Mention capping forbid lints)
- #58536 (Remove UB in pointer tests)
- #58538 (Add missing fmt structs examples)
- #58539 (Add alias methods to PathBuf for underlying OsString (#58234))
- #58544 (Fix doc for rustc "-g" flag)
- #58545 (Add regression test for a specialization-related ICE (#39448))
- #58546 (librustc_codegen_llvm => 2018)
- #58551 (Explain a panic in test case net::tcp::tests::double_bind)
- #58553 (Use more impl header lifetime elision)
- #58562 (Fix style nits)
- #58565 (Fix typo in std::future::Future docs)
- #58568 (Fix a transposition in driver.rs.)
- #58569 (Reduce Some Code Repetitions like `(n << amt) >> amt`)
- #58576 (Stabilize iter::successors and iter::from_fn)
|
|
|
|
Make overflowing and wrapping negation const
Remember that the signed and unsigned versions are slightly different here, so there's four functions made const instead of just two.
|
|
Add regression test for a specialization-related ICE (#39448)
Closes #39448.
This is my first time contributing, I hope I got everything right. :)
|
|
rustdoc: respect alternate flag when formatting impl trait
Fixes #58226.
Before:
<img width="963" alt="screen shot 2019-02-12 at 3 23 30 pm" src="https://user-images.githubusercontent.com/1372438/52665732-4496ea00-2eda-11e9-9e29-efffe43b2abf.png">
After:
<img width="964" alt="screen shot 2019-02-12 at 3 23 51 pm" src="https://user-images.githubusercontent.com/1372438/52665733-452f8080-2eda-11e9-999a-dd1fb28dee16.png">
|
|
Modify doctest's auto-`fn main()` to allow `Result`s
This lets the default `fn main()` ~~return `impl Termination`~~ unwrap Results, which allows the use of `?` in most tests without adding it manually. This fixes #56260
~~Blocked on `std::process::Termination` stabilization.~~
Using `Termination` would have been cleaner, but this should work OK.
|
|
Be more permissive with required bounds on existential types
fixes #54184
r? @pnkfelix
|
|
rustdoc: Don't modify library path for doctests
It shouldn't be needed anymore because doctests are no longer compiled with `prefer-dynamic` (since #54939).
r? @QuietMisdreavus
|
|
Add const generics to the HIR
Split out from https://github.com/rust-lang/rust/pull/53645.
cc @yodaldevoid
r? @eddyb
|
|
|
|
|
|
|
|
This lets the default `fn main()` unwrap any `Result`s, which
allows the use of `?` in most tests without adding it manually.
|
|
r=oli-obk
Notify myself when Clippy toolstate changes
|
|
r=ollie27
Rustdoc remove old style files
Reopening of #56577 (which I can't seem to reopen...).
I made the flag unstable so with this change, what was blocking the PR is now gone I assume.
|
|
r=oli-obk
compile-pass test for #53606
fixes #53606
|
|
|
|
|
|
|
|
Add specific feature gate error for const-unstable features
Before:
```
error: `impl Trait` in const fn is unstable
--> src/lib.rs:7:19
|
7 | const fn foo() -> impl T {
| ^^^^^^
error: aborting due to previous error
```
After:
```
error[E0723]: `impl Trait` in const fn is unstable (see issue #57563)
--> src/lib.rs:7:19
|
7 | const fn foo() -> impl T {
| ^^^^^^
= help: add #![feature(const_fn)] to the crate attributes to enable
error: aborting due to previous error
```
This improves the situation with https://github.com/rust-lang/rust/issues/57563. Fixes https://github.com/rust-lang/rust/issues/57544. Fixes https://github.com/rust-lang/rust/issues/54469.
r? @oli-obk
|
|
Fix #57730
cc https://github.com/rust-lang/rust/pull/57730
r? @cramertj
|
|
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
|
|
Always emit an error for a query cycle
r? @michaelwoerister
cc @nikomatsakis @wesleywiser
|
|
|
|
In our type inference system, when we "generalize" a type T to become
a suitable value for a type variable V, we sometimes wind up creating
new inference variables. So, for example, if we are making V be some
subtype of `&'X u32`, then we might instantiate V with `&'Y u32`.
This generalized type is then related `&'Y u32 <: &'X u32`, resulting
in a region constriant `'Y: 'X`. Previously, however, we were making
these fresh variables like `'Y` in the "current universe", but they
should be created in the universe of V. Moreover, we sometimes cheat
in an invariant context and avoid creating fresh variables if we know
the result must be equal -- we can only do that when the universes
work out.
|
|
rustc_mir: split qualify_consts' "value qualification" bitflags into separate computations.
Prerequisite for computing those bits through a dataflow algorithm ~~(which I might do in this PR later)~~.
This PR should not change behavior overall, other than treating `simd_shuffle*` identically to `#[rustc_args_required_const]` (maybe we should just have `#[rustc_args_required_const]` on the intrinsic imports of `simd_shuffle*`? cc @gnzlbg)
cc @oli-obk @alexreg
|
|
|
|
|