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(build-std): make mock-std closer to real world #14896

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// intentionally blank
#![no_std]
1 change: 1 addition & 0 deletions tests/testsuite/mock-std/library/core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![no_std]
#![feature(staged_api)]
#![stable(since = "1.0.0", feature = "dummy")]

Expand Down
11 changes: 6 additions & 5 deletions tests/testsuite/standard_lib.rs
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need {aarch64,x86_64}-unknown-none targets installed to make test_std_on_unsupported_target compile. We need to tweak cargo CI and cargo-test-macro to support this use case. That is out of scope of this PR.

Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,13 @@ fn test_std_on_unsupported_target() {

let p = project()
.file(
"src/main.rs",
"src/lib.rs",
r#"
fn main() {
println!("hello");
}
"#,
#![no_std]
pub fn foo() {
assert_eq!(u8::MIN, 0);
}
"#,
)
.build();

Expand Down
Loading