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

Test failure when enabling vendoring #123688

Closed
filnet opened this issue Apr 9, 2024 · 1 comment
Closed

Test failure when enabling vendoring #123688

filnet opened this issue Apr 9, 2024 · 1 comment
Labels
C-bug Category: This is a bug.

Comments

@filnet
Copy link

filnet commented Apr 9, 2024

When configuring the build with --enable-vendor, the ui\issues\issue-21763.rs fails as follows:

---- [ui] tests\ui\issues\issue-21763.rs stdout ----
$DIR\issue-21763.rs
\M\mingw-w64-rust\src\rustc-1.77.1-src\vendor\hashbrown\src\map.rs
$SRC_DIR\std\src\collections\hash\map.rs
$DIR\issue-21763.rs
diff of stderr:

8	   = note: required because it appears within the type `(Rc<()>, Rc<()>)`
9	   = note: required for `hashbrown::raw::RawTable<(Rc<()>, Rc<()>)>` to implement `Send`
10	note: required because it appears within the type `hashbrown::map::HashMap<Rc<()>, Rc<()>, RandomState>`
-	  --> $HASHBROWN_SRC_LOCATION
+	  --> C:/M/mingw-w64-rust/src/rustc-1.77.1-src/vendor/hashbrown/src/map.rs:190:12
+	   |
+	LL | pub struct HashMap<K, V, S = DefaultHashBuilder, A: Allocator = Global> {
+	   |            ^^^^^^^
12	note: required because it appears within the type `HashMap<Rc<()>, Rc<()>>`
13	  --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
14	note: required by a bound in `foo`

The test itself is:

// Regression test for HashMap only impl'ing Send/Sync if its contents do

// normalize-stderr-test: "\S+hashbrown-\S+" -> "$$HASHBROWN_SRC_LOCATION"

use std::collections::HashMap;
use std::rc::Rc;

fn foo<T: Send>() {}

fn main() {
    foo::<HashMap<Rc<()>, Rc<()>>>();
    //~^ ERROR `Rc<()>` cannot be sent between threads safely
}

The cause of the failure is that normalization of the std err output is not done properly.
The normalization regex "\S+hashbrown-\S+" is expecting a versioned hashbrown crate but the vendoring adds a non versioned crate that is picked up when running the test.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 9, 2024
@workingjubilee
Copy link
Member

@filnet I believe that is fixed since #123652

@jieyouxu jieyouxu added C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

4 participants