Commit Graph

163186 Commits

Author SHA1 Message Date
John Paul Adrian Glaubitz
990326fa74 library/panic_unwind: Define UNWIND_DATA_REG for m68k 2022-02-12 20:19:06 +00:00
ltdk
de6e973176 Stabilise inherent_ascii_escape (FCP in #77174) 2022-02-12 13:21:59 -05:00
ltdk
9efe61df7f Fix signature of u8::escape_ascii 2022-02-12 13:15:10 -05:00
Erik Desjardins
401307759a make fastcall-inreg and riscv64-lp64-lp64f-lp64d-abi tests able to run on any host platform (with the right llvm components) 2022-02-12 12:28:19 -05:00
Jack Huey
a0d603f6e8 Don't relabel to a team if there is already a team label 2022-02-12 11:47:00 -05:00
bors
5d8767cb22 Auto merge of #93939 - RalfJung:miri, r=RalfJung
update miri

to fix the libcore test suite
r? `@ghost`
2022-02-12 16:41:24 +00:00
bors
9c3a3e3d5b Auto merge of #93697 - the8472:fix-windows-path-hash, r=Mark-Simulacrum
Fix hashing for windows paths containing a CurDir component

* the logic only checked for / but not for \
* verbatim paths shouldn't skip items at all since they don't get normalized
* the extra branches get optimized out on unix since is_sep_byte is a trivial comparison and is_verbatim is always-false
* tests lacked windows coverage for these cases

That lead to equal paths not having equal hashes and to unnecessary collisions.
2022-02-12 14:01:13 +00:00
Matthew Jasper
030c50824c Address review comment
canonicalize_chalk_query -> canonicalize_query_preserving_universes
2022-02-12 13:39:52 +00:00
Matthew Jasper
f718b51690 Update chalk tests 2022-02-12 13:39:52 +00:00
Badel2
410145e0a7 Suggest disabling download-ci-llvm option if url fails to download 2022-02-12 14:23:35 +01:00
The 8472
1d21ce723c ignore test on wasm32
A fix applied to std::Path::hash triggers a miscompilation/assert in LLVM in this test on wasm32.
The miscompilation appears to pre-existing. Reverting some previous changes done std::Path also trigger it
and slight modifications such as changing the test path from "a" to "ccccccccccc" also make it pass, indicating
it's very flaky.
Since the fix is for a higher-tier platform than wasm it takes precedence.
2022-02-12 12:54:25 +01:00
Ellen
5e0e7ff068 trailing whitespace 2022-02-12 11:48:58 +00:00
bors
f8f175199e Auto merge of #93933 - matthiaskrgr:rollup-1hjae6g, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #91908 (Add 2 tests)
 - #93595 (fix ICE when parsing lifetime as function argument)
 - #93757 (Add some known GAT bugs as tests)
 - #93759 (Pretty print ItemKind::Use in rustfmt style)
 - #93897 (linkchecker: fix panic on directory symlinks)
 - #93898 (tidy: Extend error code check)
 - #93928 (Add missing release notes for #85200)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-02-12 11:48:53 +00:00
Ralf Jung
ae99274882 update miri 2022-02-12 12:46:02 +01:00
Ellen
9130af2e4d change docs on Res::SelfTy 2022-02-12 11:23:53 +00:00
Ellen
e81e09a24e change to a struct variant 2022-02-12 11:23:53 +00:00
bjorn3
f45ba82370 Remove SPAN_DEBUG global
The only difference between the default and rustc_interface set version
is that the default accesses the source map from SESSION_GLOBALS while
the rustc_interface version accesses the source map from the global
TyCtxt. SESSION_GLOBALS is always set while running the compiler while
the global TyCtxt is not always set. If the global TyCtxt is set, it's
source map is identical to the one in SESSION_GLOBALS
2022-02-12 11:50:02 +01:00
bjorn3
5730173763 Move setup_callbacks call to create_compiler_and_run
This ensures that it is called even when run_in_thread_pool_with_globals
is avoided and reduces code duplication between the parallel and
non-parallel version of run_in_thread_pool_with_globals
2022-02-12 11:47:53 +01:00
bjorn3
bb45f5db78 Remove the RustcDefaultCalls struct
It is a leftover from before the introduction of rustc_interface
2022-02-12 11:47:50 +01:00
Hans Kratz
59536fb023 Allow inlining of ensure_sufficient_stack() 2022-02-12 11:30:04 +01:00
Deadbeef
88d433e56f
Rebless 2022-02-12 19:34:52 +11:00
Matthias Krüger
0e3ecd28fd
Rollup merge of #93928 - nsunderland1:master, r=Mark-Simulacrum
Add missing release notes for #85200

Fixes #93894
2022-02-12 09:26:26 +01:00
Matthias Krüger
16f490f354
Rollup merge of #93898 - GuillaumeGomez:error-code-check, r=Mark-Simulacrum
tidy: Extend error code check

We discovered in https://github.com/rust-lang/rust/pull/93845 that the error code tidy check didn't check everything: if you remove an error code from the listing even if it has an explanation, then it should error.

It also allowed me to put back `E0192` in that listing as well.

r? ```@Mark-Simulacrum```
2022-02-12 09:26:25 +01:00
Matthias Krüger
475b45f9f1
Rollup merge of #93897 - schopin-pro:linkchecker-symlink, r=Mark-Simulacrum
linkchecker: fix panic on directory symlinks

In Debian and Ubuntu, there are some patches that change the rustc/fonts
directory to a symlink to the system fonts. This triggers a latent bug
in linkchecker, as the DirEntry filetype isn't a dir but later on the
file itself, when opened, is one, triggering an unreachable!() clause.

This patch fixes the situation by using std::fs::metadata, which goes
through symlinks.

I'd have added a test case but `tidy` doesn't seem to like symlinks, and
moreover I'm not sure how Git deals with symlinks on Windows.

Signed-off-by: Simon Chopin <simon.chopin@canonical.com>
2022-02-12 09:26:24 +01:00
Matthias Krüger
f30f6def0f
Rollup merge of #93759 - dtolnay:usetree, r=nagisa
Pretty print ItemKind::Use in rustfmt style

This PR backports the formatting for `use` items from https://github.com/dtolnay/prettyplease into rustc_ast_pretty.

Before:

```rust
use core::{cmp::{Eq, Ord, PartialEq, PartialOrd},
    convert::{AsMut, AsRef, From, Into},
    iter::{DoubleEndedIterator, ExactSizeIterator, Extend, FromIterator,
    IntoIterator, Iterator},
    marker::{Copy as Copy, Send as Send, Sized as Sized, Sync as Sync, Unpin
    as U}, ops::{*, Drop, Fn, FnMut, FnOnce}};
```

After:

```rust
use core::{
    cmp::{Eq, Ord, PartialEq, PartialOrd},
    convert::{AsMut, AsRef, From, Into},
    iter::{
        DoubleEndedIterator, ExactSizeIterator, Extend, FromIterator,
        IntoIterator, Iterator,
    },
    marker::{
        Copy as Copy, Send as Send, Sized as Sized, Sync as Sync, Unpin as U,
    },
    ops::{*, Drop, Fn, FnMut, FnOnce},
};
```
2022-02-12 09:26:23 +01:00
Matthias Krüger
36461e0447
Rollup merge of #93757 - jackh726:gat-bug-tests, r=nikomatsakis
Add some known GAT bugs as tests

In the spirit of rust-lang/compiler-team#476

These tests are marked as "check-fail", but also commented with "this should pass". This many of the open GAT issues that are accepted bugs.

r? ``@nikomatsakis``
2022-02-12 09:26:22 +01:00
Matthias Krüger
602898a305
Rollup merge of #93595 - compiler-errors:ice-on-lifetime-arg, r=jackh726
fix ICE when parsing lifetime as function argument

I don't really like this, but we basically need to emit an error instead of just delaying an bug, because there are too many places in the AST that aren't covered by my previous PRs...

cc: https://github.com/rust-lang/rust/issues/93282#issuecomment-1028052945
2022-02-12 09:26:21 +01:00
Matthias Krüger
661be4c782
Rollup merge of #91908 - matthiaskrgr:ices, r=jackh726
Add 2 tests

fixes #91139
fixes #91069
2022-02-12 09:26:20 +01:00
Deadbeef
12397ab48b
Report the selection error when possible 2022-02-12 19:24:43 +11:00
Deadbeef
cccf4b2fc3
Adapt new change 2022-02-12 19:24:43 +11:00
Deadbeef
d3acb9d00e
Handle Fn family trait call errror 2022-02-12 19:24:43 +11:00
Deadbeef
6d6314f878
Rebased and improved errors 2022-02-12 19:24:42 +11:00
Deadbeef
b5235ea732
bless you 2022-02-12 19:24:41 +11:00
Deadbeef
f7f0f843b7
Improve error messages even more 2022-02-12 19:24:08 +11:00
Deadbeef
1b0dcdc341
More informative error message for E0015 2022-02-12 19:24:04 +11:00
Jack Huey
ba4221567b
Fix line number
Co-authored-by: David Tolnay <dtolnay@gmail.com>
2022-02-12 00:57:16 -05:00
Will Crichton
fbbcb089c5 Add --scrape-tests flags so rustdoc can scrape examples from tests 2022-02-11 21:48:59 -08:00
bors
9cdefd763b Auto merge of #93691 - compiler-errors:mir-tainted-by-errors, r=oli-obk
Implement `tainted_by_errors` in MIR borrowck, use it to skip CTFE

Putting this up for initial review. The issue that I found is when we're evaluating a const, we're doing borrowck, but doing nothing with the fact that borrowck fails.

This implements a `tainted_by_errors` field for MIR borrowck like we have in infcx, so we can use that information to return an `Err` during const eval if our const fails to borrowck.

This PR needs some cleaning up. I should probably just use `Result` in more places, instead of `.expect`ing in the places I am, but I just wanted it to compile so I could see if it worked!

Fixes #93646

r? `@oli-obk`
feel free to reassign
2022-02-12 05:19:33 +00:00
Erik Desjardins
ae877003ec fix non-x64 tests 2022-02-12 00:13:10 -05:00
cyqsimon
f6f93fd7ba
Add note on Windows path behaviour 2022-02-12 12:52:42 +08:00
yuhaixin.hx
daa3c795dc add link to format_args! when being mentioned in doc 2022-02-12 12:35:30 +08:00
cyqsimon
160faf1b30
Option::and_then basic example: show failure 2022-02-12 12:23:38 +08:00
cyqsimon
adfac00f45
Result::and_then: show type conversion 2022-02-12 12:19:03 +08:00
cyqsimon
7eaecc6508
Result::and_then: improve basic example 2022-02-12 12:12:11 +08:00
nsunderland1
56d43a28fe Add missing release notes for #85200 2022-02-11 18:07:12 -08:00
bors
fc323035ac Auto merge of #93671 - Kobzol:stable-hash-const, r=the8472
Use const generics in SipHasher128's short_write

This was proposed by `@michaelwoerister` [here](https://github.com/rust-lang/rust/pull/93615#discussion_r799485554).
A few comments:
1) I tried to pass `&[u8; LEN]` instead of `[u8; LEN]`. Locally, it resulted in small icount regressions (about 0.5 %). When passing by value, there were no regressions (and no improvements).
2) I wonder if we should use `to_ne_bytes()` in `SipHasher128` to keep it generic and only use `to_le_bytes()` in `StableHasher`. However, currently `SipHasher128` is only used in `StableHasher` and the `short_write` method was private, so I couldn't use it directly from `StableHasher`. Using `to_le()` in the `StableHasher` was breaking this abstraction boundary before slightly.

```rust
debug_assert!(LEN <= 8);
```
This could be done at compile time, but actually I think that now we can remove this assert altogether.

r? `@the8472`
2022-02-12 02:05:11 +00:00
Michael Goulet
5be9e79ae0
Update expr.rs
Revert spurious changes included in PR
2022-02-11 17:48:06 -08:00
Camille GILLOT
10cf626d0e Bless nll tests. 2022-02-12 01:26:17 +01:00
Camille GILLOT
c6a3f5d606 Update error code documentation. 2022-02-12 01:26:17 +01:00
Camille GILLOT
289216f281 Bless clippy test. 2022-02-12 01:26:17 +01:00