Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #108666

Closed
wants to merge 24 commits into from

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Mar 2, 2023

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

CraftSpider and others added 24 commits February 20, 2023 13:47
…ons for miri. Credit to emarteca for the code.
Support allocations with non-Box<[u8]> bytes

This is prep work for allowing miri to support passing pointers to C code, which will require `Allocation`s to be correctly aligned. Currently, it just makes `Allocation` generic and plumbs the necessary changes through the right places.

The follow-up to this will be adding a type in the miri interpreter which correctly aligns the bytes, using that for the Miri engine, then allowing Miri to pass pointers into these allocations to C calls.

Based off of rust-lang#100467, credit to ``@emarteca`` for the code
… r=pietroalbini

Re-apply "switch to the macos-12-xl builder"

This reverts commit e63ec2e, essentially re-applying fcbae98.

r? ```@pietroalbini```
…-span-fix-Some, r=WaffleLapkin

Point error span at Some constructor argument when trait resolution fails

This is a follow up to rust-lang#108254 and rust-lang#106477 which extends error span refinement to handle a case which I mistakenly believed was handled in rust-lang#106477. The goal is to refine the error span depicted below:

```rs
trait Fancy {}
impl <T> Fancy for Option<T> where T: Iterator {}

fn want_fancy<F>(f: F) where F: Fancy {}

fn example() {
    want_fancy(Some(5));
//  (BEFORE)   ^^^^^^^ `{integer}` is not an iterator
//  (AFTER)         ^  `{integer}` is not an iterator
}
```

I had used a (slightly more complex) example as an illustrative example in rust-lang#108254 , but hadn't actually turned it into a test, because I had (incorrectly) believed at the time it was covered by existing behavior. It turns out that `Some` is slightly "special" in that it resolves differently from the other `enum` constructors I had tried, and therefore this test was actually broken.

I've now updated the tests to include this example, and fixed the code to correctly resolve the `Some` constructor so that the span of the error is reduced.
Explain compile-time vs run-time difference in env!() error message

This PR is clarifying error message of `env!()` based on this user question: https://users.rust-lang.org/t/environment-variable-out-dir-is-undefined/90067

It makes it clear that `env!()` is for env variables defined at compile-time. There's special-case help text for common Cargo build script variables.

I've also rearranged the code to avoid allocating error message on the happy path when the env var is defined.
…WaffleLapkin

Properly colorize multi-part suggestions in the same line

Fix rust-lang#108547.
…arsan68

Allow setting hashmap toml values in `./configure`

Fixes rust-lang#108621
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 2, 2023
@rustbot rustbot added the rollup A PR which is a rollup label Mar 2, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Mar 2, 2023

📌 Commit 5acde60 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 2, 2023
@bors
Copy link
Contributor

bors commented Mar 2, 2023

⌛ Testing commit 5acde60 with merge a80f4bce35bada8d953f80ad3a788ebe1445281a...

@bors
Copy link
Contributor

bors commented Mar 2, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 2, 2023
@matthiaskrgr
Copy link
Member Author

Uhm, wut..

Run src/ci/scripts/upload-artifacts.sh
cp: cannot stat 'build/metrics.json': No such file or directory

@matthiaskrgr
Copy link
Member Author

failed due to #108627

@rust-log-analyzer
Copy link
Collaborator

The job i686-msvc-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [ui] tests\ui\zero-sized\zero-sized-btreemap-insert.rs ... ok

failures:

---- [ui] tests\ui\suggestions\multiline-multipart-suggestion.rs stdout ----
$DIR\multiline-multipart-suggestion.rs
$DIR\multiline-multipart-suggestion.rs
$DIR\multiline-multipart-suggestion.rs

- error[E0106]: missing lifetime specifier
-   --> $DIR/multiline-multipart-suggestion.rs:3:34
-    |
-    |
- LL | fn short(foo_bar: &Vec<&i32>) -> &i32 {
-    |                   ----------     ^ expected named lifetime parameter
-    |
-    = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
+ error[E0106]: missing lifetime specifier
+   --> $DIR/multiline-multipart-suggestion.rs:3:34
+    |
+ LL | fn short(foo_bar: &Vec<&i32>) -> &i32 {
+    |                   ----------     ^ expected named lifetime parameter
+    |
+    = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
8 help: consider introducing a named lifetime parameter
-    |
- LL | fn short<'a>(foo_bar: &'a Vec<&'a i32>) -> &'a i32 {
-    |         ++++           ++      ++           ++
+    |
+ LL | fn short<'a>(foo_bar: &'a Vec<&'a i32>) -> &'a i32 {
+    |         ++++           ++      ++           ++
- error[E0106]: missing lifetime specifier
-   --> $DIR/multiline-multipart-suggestion.rs:10:6
-    |
-    |
- LL |     foo_bar: &Vec<&i32>,
-    |              ----------
- LL |     something_very_long_so_that_the_line_will_wrap_around__________: i32,
- LL | ) -> &i32 {
-    |      ^ expected named lifetime parameter
-    |
-    = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
+ error[E0106]: missing lifetime specifier
+   --> $DIR/multiline-multipart-suggestion.rs:10:6
+    |
+ LL |     foo_bar: &Vec<&i32>,
+    |              ----------
+ LL |     something_very_long_so_that_the_line_will_wrap_around__________: i32,
+ LL | ) -> &i32 {
+    |      ^ expected named lifetime parameter
+    |
+    = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
23 help: consider introducing a named lifetime parameter
-    |
- LL ~ fn long<'a>(
- LL ~     foo_bar: &'a Vec<&'a i32>,
- LL |     something_very_long_so_that_the_line_will_wrap_around__________: i32,
- LL ~ ) -> &'a i32 {
+    |
+    |
+ LL ~ fn long<'a>(
+ LL ~     foo_bar: &'a Vec<&'a i32>,
+ LL |     something_very_long_so_that_the_line_will_wrap_around__________: i32,
+ LL ~ ) -> &'a i32 {
30 
- error[E0106]: missing lifetime specifier
-   --> $DIR/multiline-multipart-suggestion.rs:15:29
-    |
-    |
- LL |     foo_bar: &Vec<&i32>) -> &i32 {
-    |              ----------     ^ expected named lifetime parameter
-    |
-    = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
+ error[E0106]: missing lifetime specifier
+   --> $DIR/multiline-multipart-suggestion.rs:15:29
+    |
+ LL |     foo_bar: &Vec<&i32>) -> &i32 {
+    |              ----------     ^ expected named lifetime parameter
+    |
+    = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
38 help: consider introducing a named lifetime parameter
-    |
- LL ~ fn long2<'a>(
- LL ~     foo_bar: &'a Vec<&'a i32>) -> &'a i32 {
+    |
+    |
+ LL ~ fn long2<'a>(
+ LL ~     foo_bar: &'a Vec<&'a i32>) -> &'a i32 {
43 
- error: aborting due to 3 previous errors
+ error: aborting due to 3 previous errors
45 
---
To only update this specific test, also pass `--test-args suggestions\multiline-multipart-suggestion.rs`

error: 1 errors occurred comparing output.
status: exit code: 1
command: PATH="D:\a\rust\rust\build\i686-pc-windows-msvc\stage2\bin;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x86;D:\a\rust\rust\build\i686-pc-windows-msvc\stage0-bootstrap-tools\i686-pc-windows-msvc\release\deps;D:\a\rust\rust\build\i686-pc-windows-msvc\stage0\bin;C:\Program Files\PowerShell\7;D:\a\rust\rust\ninja;D:\a\rust\rust\msys2\mingw32\bin;C:\hostedtoolcache\windows\Python\3.11.2\x64\Scripts;C:\hostedtoolcache\windows\Python\3.11.2\x64;C:\msys64\usr\bin;D:\a\rust\rust\sccache;C:\Program Files\MongoDB\Server\5.0\bin;C:\aliyun-cli;C:\vcpkg;C:\cf-cli;C:\Program Files (x86)\NSIS;C:\tools\zstd;C:\Program Files\Mercurial;C:\hostedtoolcache\windows\stack\2.9.3\x64;C:\cabal\bin;C:\ghcup\bin;C:\Program Files\dotnet;C:\mysql\bin;C:\Program Files\R\R-4.2.2\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\pipx_bin;C:\npm\prefix;C:\hostedtoolcache\windows\go\1.17.13\x64\bin;C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts;C:\hostedtoolcache\windows\Python\3.7.9\x64;C:\hostedtoolcache\windows\Ruby\2.5.9\x64\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.362-9\x64\bin;C:\Program Files\ImageMagick-7.1.0-Q16-HDRI;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\Chocolatey\bin;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn;C:\Program Files\OpenSSL\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.0\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\GitHub CLI;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\SeleniumWebDrivers\ChromeDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files (x86)\Microsoft BizTalk Server;C:\Program Files\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps" "D:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage2\\bin\\rustc.exe" "D:\\a\\rust\\rust\\tests\\ui\\suggestions\\multiline-multipart-suggestion.rs" "-Zthreads=1" "--target=i686-pc-windows-msvc" "-Ccodegen-units=1" "-Zui-testing" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--remap-path-prefix=D:\\a\\rust\\rust\\tests\\ui=fake-test-src-base" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "D:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\test\\ui\\suggestions\\multiline-multipart-suggestion" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=D:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\native\\rust-test-helpers" "-L" "D:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\test\\ui\\suggestions\\multiline-multipart-suggestion\\auxiliary" "--error-format=human" "--color=always"
stdout: none
--- stderr -------------------------------
error[E0106]: missing lifetime specifier
  --> fake-test-src-base\suggestions\multiline-multipart-suggestion.rs:3:34
   |
LL | fn short(foo_bar: &Vec<&i32>) -> &i32 { //~ ERROR missing lifetime specifier
   |                   ----------     ^ expected named lifetime parameter
   |
   = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
help: consider introducing a named lifetime parameter
   |
LL | fn short<'a>(foo_bar: &'a Vec<&'a i32>) -> &'a i32 { //~ ERROR missing lifetime specifier
   |         ++++           ++      ++           ++
error[E0106]: missing lifetime specifier
error[E0106]: missing lifetime specifier
  --> fake-test-src-base\suggestions\multiline-multipart-suggestion.rs:10:6
   |
LL |     foo_bar: &Vec<&i32>,
   |              ----------
LL |     something_very_long_so_that_the_line_will_wrap_around__________: i32,
LL | ) -> &i32 {
   |      ^ expected named lifetime parameter
   |
   = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
help: consider introducing a named lifetime parameter
   |
LL ~ fn long<'a>( //~ ERROR missing lifetime specifier
LL ~     foo_bar: &'a Vec<&'a i32>,
LL |     something_very_long_so_that_the_line_will_wrap_around__________: i32,
LL ~ ) -> &'a i32 {

error[E0106]: missing lifetime specifier
error[E0106]: missing lifetime specifier
  --> fake-test-src-base\suggestions\multiline-multipart-suggestion.rs:15:29
   |
LL |     foo_bar: &Vec<&i32>) -> &i32 {
   |              ----------     ^ expected named lifetime parameter
   |
   = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
help: consider introducing a named lifetime parameter
   |
LL ~ fn long2<'a>( //~ ERROR missing lifetime specifier
LL ~     foo_bar: &'a Vec<&'a i32>) -> &'a i32 {

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0106`.

@matthiaskrgr matthiaskrgr deleted the rollup-v5qc7vr branch March 16, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.