Matthias Krüger
5201bb53bb
remove redundant clones
2023-02-10 18:08:25 +01:00
bors
d1ac43a9b9
Auto merge of #107652 - estebank:re_error, r=oli-obk
...
Introduce `ReError`
CC #69314
r? `@nagisa`
2023-02-10 10:10:12 +00:00
bors
9b8dbd558c
Auto merge of #107870 - matthiaskrgr:rollup-3z1q4rm, r=matthiaskrgr
...
Rollup of 6 pull requests
Successful merges:
- #107043 (Support `true` and `false` as boolean flag params)
- #107831 (Query refactoring)
- #107841 (Handled snap curl issue inside Rust)
- #107852 (rustdoc: remove unused fn parameter `tab`)
- #107861 (Sync release notes for 1.67.1)
- #107863 (Allow multiple candidates with same response in new solver)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2023-02-10 06:20:01 +00:00
Matthias Krüger
9300617dab
Rollup merge of #107863 - compiler-errors:new-solver-multiple-candidates, r=jackh726
...
Allow multiple candidates with same response in new solver
Treat >1 candidates as *not* ambiguous if they return the same response.
2023-02-10 06:09:59 +01:00
Matthias Krüger
dd5e4ade6e
Rollup merge of #107861 - cuviper:relnotes-1.67.1, r=Mark-Simulacrum
...
Sync release notes for 1.67.1
Closes #107859 .
2023-02-10 06:09:58 +01:00
Matthias Krüger
d4d1c93730
Rollup merge of #107852 - notriddle:notriddle/rm-tab, r=GuillaumeGomez
...
rustdoc: remove unused fn parameter `tab`
2023-02-10 06:09:58 +01:00
Matthias Krüger
8bfb97cc8a
Rollup merge of #107841 - tharunsuresh-code:snap_curl, r=ozkanonur
...
Handled snap curl issue inside Rust
2023-02-10 06:09:57 +01:00
Matthias Krüger
11e128025a
Rollup merge of #107831 - nnethercote:query-refactoring, r=oli-obk
...
Query refactoring
Just some cleanups I found when learning about the query system.
Best reviewed one commit at a time.
r? `@oli-obk`
2023-02-10 06:09:57 +01:00
Matthias Krüger
8fc9ed51f0
Rollup merge of #107043 - Nilstrieb:true-and-false-is-false, r=wesleywiser
...
Support `true` and `false` as boolean flag params
Implements [MCP 577](https://github.com/rust-lang/compiler-team/issues/577 ).
2023-02-10 06:09:56 +01:00
bors
a697573463
Auto merge of #101680 - jackh726:implied-cleanup, r=lcnr
...
Fix implied outlives bounds logic for projections
The logic here is subtly wrong. I put a bit of an explanation in a767d7b5165cea8ee5cbe494a4a636c50ef67c9c.
TL;DR: we register outlives predicates to be proved, because wf code normalizes projections (from the unnormalized types) to type variables. This causes us to register those as constraints instead of implied. This was "fine", because we later added that implied bound in the normalized type, and delayed registering constraints. When I went to cleanup `free_region_relations` to *not* delay adding constraints, this bug was uncovered.
cc. `@aliemjay` because this caused your test failure in #99832 (I only realized as I was writing this)
r? `@nikomatsakis`
2023-02-10 03:21:39 +00:00
Jack Huey
0637b6b471
Update implied_outlives_bounds to properly register implied bounds behind normalization
2023-02-09 21:08:11 -05:00
Jack Huey
1a663c0f53
Cleanup free_region_relations a bit
2023-02-09 20:38:27 -05:00
Michael Goulet
3c4e1f85cb
Multiple candidates with same response is not ambiguous
2023-02-10 00:35:25 +00:00
bors
a12d31d5a6
Auto merge of #102963 - ilammy:xray-basic, r=estebank
...
Add `-Z instrument-xray` flag
Implement MCP https://github.com/rust-lang/compiler-team/issues/561 , adding `-Z instrument-xray` flag which enables XRay instrumentation in LLVM.
2023-02-10 00:02:43 +00:00
Josh Stone
6e1a28b550
Release 1.67.1
2023-02-09 15:22:35 -08:00
bors
8996ea93b6
Auto merge of #107853 - Dylan-DPC:rollup-macf1qo, r=Dylan-DPC
...
Rollup of 6 pull requests
Successful merges:
- #107648 (unused-lifetimes: don't warn about lifetimes originating from expanded code)
- #107655 (rustdoc: use the same URL escape rules for fragments as for examples)
- #107659 (test: snapshot for derive suggestion in diff files)
- #107786 (Implement some tweaks in the new solver)
- #107803 (Do not bring trait alias supertraits into scope)
- #107815 (Disqualify `auto trait` built-in impl in new solver if explicit `impl` exists)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2023-02-09 20:23:00 +00:00
Dylan DPC
b080a1a4fc
Rollup merge of #107815 - compiler-errors:new-solver-no-auto-if-impl, r=lcnr
...
Disqualify `auto trait` built-in impl in new solver if explicit `impl` exists
2023-02-09 23:18:37 +05:30
Dylan DPC
16a4138387
Rollup merge of #107803 - eggyal:do_not_bring_trait_alias_supertraits_into_scope, r=compiler-errors
...
Do not bring trait alias supertraits into scope
Fixes #107747
cc #41517
2023-02-09 23:18:36 +05:30
Dylan DPC
39ba11036a
Rollup merge of #107786 - compiler-errors:new-solver-some-tweaks, r=lcnr
...
Implement some tweaks in the new solver
I've been testing the new solver on some small codebases, and these are a few small changes I've needed to make.
The most "controversial" here is implementing `trait_candidate_should_be_dropped_in_favor_of`, which I just implemented to always return false. This surprisingly allows some code to compile, without us having to actually decide on any semantics yet.
r? `@rust-lang/initiative-trait-system-refactor`
2023-02-09 23:18:35 +05:30
Dylan DPC
5aa062e249
Rollup merge of #107659 - bvanjoi:issue-107649, r=estebank
...
test: snapshot for derive suggestion in diff files
fixed #107649
2023-02-09 23:18:35 +05:30
Dylan DPC
188dd72b5f
Rollup merge of #107655 - notriddle:notriddle/small-url-encode, r=GuillaumeGomez
...
rustdoc: use the same URL escape rules for fragments as for examples
Carries over improvements from #107284
2023-02-09 23:18:34 +05:30
Dylan DPC
be1789a56d
Rollup merge of #107648 - matthiaskrgr:unused_lifetime_104432_fix, r=cjgillot
...
unused-lifetimes: don't warn about lifetimes originating from expanded code
previously, we would warn like this:
````
warning: lifetime parameter `'s` never used
--> /tmp/unusedlif/code.rs:6:62
|
5 | #[derive(Clone)]
| - help: elide the unused lifetime
6 | struct ShimMethod4<T: Trait2 + 'static>(pub &'static dyn for<'s> Fn(&'s mut T::As));
| ^^
|
= note: requested on the command line with `-W unused-lifetimes`
````
Fixes #104432
2023-02-09 23:18:34 +05:30
Michael Howell
792b8464e7
rustdoc: remove unused fn parameter tab
2023-02-09 10:42:42 -07:00
Michael Goulet
68e27b3052
Disqualify auto-trait builtin impl in new solver if impl exists
2023-02-09 17:23:50 +00:00
Michael Goulet
654f43f34e
Move winnowing to assembly
2023-02-09 17:22:39 +00:00
Michael Goulet
8987e68247
Implement a dummy drop-in-favor-of for the new solver
2023-02-09 17:22:37 +00:00
Michael Goulet
8c67ecd124
Use elaborated item bounds for alias types
2023-02-09 17:16:47 +00:00
Michael Goulet
8dadd54f52
Fix subst issue with object_ty_for_trait
2023-02-09 17:16:47 +00:00
bohan
7615045ebd
test: snapshot for derive suggestion in diff files
2023-02-09 22:28:53 +08:00
bors
8cca42a47f
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
...
Sync rustc_codegen_cranelift
* Couple of bugfixes
* A significant runtime perf improvement
* Implemented sym and const support for inline asm
* Improved self profile integration
r? `@ghost`
`@rustbot` label +A-codegen +A-cranelift +T-compiler
2023-02-09 14:12:59 +00:00
bjorn3
e25566e20b
Merge commit '7d53619064ab7045c383644cb445052d2a3d46db' into sync_cg_clif-2023-02-09
2023-02-09 12:38:16 +01:00
bors
5919f62cf6
Auto merge of #107840 - matthiaskrgr:rollup-e6v7x0a, r=matthiaskrgr
...
Rollup of 5 pull requests
Successful merges:
- #107446 (Migrate some of `rustc_parse` to derive diagnostics)
- #107752 (Specify dlltool prefix when generating import libs)
- #107808 (bootstrap.py: fix build-failure message)
- #107834 (create symlink for legacy rustfmt path)
- #107835 (use idiomatic formatting)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2023-02-09 10:42:15 +00:00
Esteban Küber
3689295a6b
Use ErrorGuaranteed
more in ReError
2023-02-09 10:38:45 +00:00
Esteban Küber
3222725538
Fix RegionKind: PartialEq
to account for ReError
2023-02-09 10:26:50 +00:00
Esteban Küber
ed8651c7b8
Use 'static RegionVid for ReError
2023-02-09 10:26:50 +00:00
Esteban Küber
861f451235
Change to ReError(ErrorGuaranteed)
2023-02-09 10:26:49 +00:00
Esteban Küber
ffaf2a5c27
review comments
2023-02-09 10:26:49 +00:00
Esteban Küber
30cf7a3f51
Introduce ReError
...
CC #69314
2023-02-09 10:26:49 +00:00
Tharun Suresh
858a4aa70c
Handled snap curl issue inside Rust #107722
2023-02-09 15:53:20 +05:30
Matthias Krüger
f2a2e298ba
Rollup merge of #107835 - tshepang:fmt, r=WaffleLapkin
...
use idiomatic formatting
Also, remove needless `else`
2023-02-09 11:21:59 +01:00
Matthias Krüger
a8df4b1530
Rollup merge of #107834 - zephaniahong:issue-107547-fix, r=albertlarsan68
...
create symlink for legacy rustfmt path
Fixes #107547 .
Main change is in the `download.rs` file. Created a symlink for the legacy rustfmt path to the new rustfmt path. Other file changes are simply as a result of porting over the symlink_file function from the Build struct to the config Struct
2023-02-09 11:21:59 +01:00
Matthias Krüger
a3e152ca81
Rollup merge of #107808 - kadiwa4:built-unsuccessfully, r=albertlarsan68
...
bootstrap.py: fix build-failure message
A small mistake I did.
Corrects #107470 , fixes #107804
r? `@albertlarsan68` (since you reviewed the last one)
2023-02-09 11:21:58 +01:00
Matthias Krüger
a621769881
Rollup merge of #107752 - riverar:rafael/gnu_dlltool_temp_prefix, r=petrochenkov
...
Specify dlltool prefix when generating import libs
Ref: https://github.com/rust-lang/rust/pull/106610#issuecomment-1418221274
tl;dr: This PR adds an explicit dlltool temporary filename prefix. The prefix resolves a race condition by ensuring dlltool temporary files are siloed in an appropriate/unique Rust temporary directory.
---
GNU dlltool, as part of its import library generation logic, uses a bunch of temporary files on disk. In the interest of deterministic build runs, dlltool supports deterministic temporary filenames. The temporary filename prefix is automatically generated internally or can be explicitly specified via a `--temp-prefix` argument.
GNU dlltool **2.38** (that ships with `x86_64-12.2.0-release-posix-seh-rt_v10-rev0` [installed during CI](https://github.com/rust-lang/rust/blob/master/src/ci/scripts/install-mingw.sh )) generates a prefix based on the target library name ([source](https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=binutils/dlltool.c;h=d95bf3f5470b999fa3b30bc887791859f48d81d1;hb=20756b0fbe065a84710aa38f2457563b57546440#l3992 )). The tool writes to files such as `target_dll_h.s` and `target_dll_s00203.o` in the current working directory.
This presents a problem when multiple instances of rustc_codegen_llvm are running to generate an import library (as part of the raw_dylib feature) for the same target library (e.g. kernel32) ([source](https://github.com/rust-lang/rust/blob/master/compiler/rustc_codegen_llvm/src/back/archive.rs#L185-L196 )). That is, dlltool instances race and may overwrite or delete files belonging to each other.
GNU dlltool **2.39**+ (not used in Rust CI) generates a prefix based on the output library path ([source](https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=binutils/dlltool.c;h=e2af20847009945b4c61a6fef08268fbb4429715;hb=b51c2fec1da205ea3e7354cbb3e253018d64873c#l3992 )). The tool, when invoked as part of rustc_codegen_llvm, writes to files at paths such as `C_Users_Foo_AppData_Local_Temp_rustcOFqhXZ_target_lib_h.s`. (The output library path is normalized and non-alphanumeric characters are replaced with underscores.)
2023-02-09 11:21:58 +01:00
Matthias Krüger
3b9543c89d
Rollup merge of #107446 - clubby789:rustc-parse-diag-migrate, r=compiler-errors
...
Migrate some of `rustc_parse` to derive diagnostics
`@rustbot` label +A-translation
r? rust-lang/diagnostics
cc #100717
2023-02-09 11:21:57 +01:00
Tshepang Mbambo
b651679d90
use idiomatic formatting
...
Also, remove needless else
2023-02-09 10:57:52 +02:00
Zephaniah Ong
41c6c5d499
port over symlink_file function from Build to Config and create symlink for legacy rustfmt path
2023-02-09 16:01:29 +08:00
bors
c40919b7a7
Auto merge of #106938 - GuillaumeGomez:normalize-projection-field-ty, r=oli-obk
...
Add missing normalization for union fields types
Overshadows https://github.com/rust-lang/rust/pull/106808 .
From the experiment https://github.com/rust-lang/rust/pull/103985 .
In short, it allows to use projections as a type for union's fields.
cc `@compiler-errors`
r? `@oli-obk`
2023-02-09 07:08:19 +00:00
Nicholas Nethercote
243944c653
Remove QueryContext
.
...
There is a type `QueryCtxt`, which impls the trait `QueryContext`.
Confusingly, there is another type `QueryContext`. The latter is (like
`TyCtxt`) just a pointer to a `GlobalContext`. It's not used much, e.g.
its `impl` block has a single method.
This commit removes `QueryContext`, replacing its use with direct
`GlobalCtxt` use.
2023-02-09 16:14:51 +11:00
Nicholas Nethercote
afbe167fbb
Avoid some tls::with
calls.
...
These are in places where a `tcx` is easily obtained.
2023-02-09 15:28:04 +11:00
Nicholas Nethercote
18f751df6a
Simplify with_tlv
.
2023-02-09 15:26:37 +11:00