Skip to content

Commit

Permalink
rustlings 100 done
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jul 8, 2024
1 parent 4c3c149 commit 95af2ef
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
7 changes: 7 additions & 0 deletions exercises/tests/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions exercises/tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "tests8"
version = "0.0.1"
edition = "2021"
[[bin]]
name = "tests8"
path = "tests8.rs"
3 changes: 2 additions & 1 deletion exercises/tests/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//! This is the build script for both tests7 and tests8.
//!
//! You should modify this file to make both exercises pass.
cargo:rustc-env=TEST_FOO=1;
cargo:rustc-cfg=pass;
fn main() {
// In tests7, we should set up an environment variable
// called `TEST_FOO`. Print in the standard output to let
Expand Down
1 change: 0 additions & 1 deletion exercises/tests/tests7.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
// Execute `rustlings hint tests7` or use the `hint` watch subcommand for a
// hint.

// I AM NOT DONE

fn main() {}

Expand Down
1 change: 0 additions & 1 deletion exercises/tests/tests8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// Execute `rustlings hint tests8` or use the `hint` watch subcommand for a
// hint.

// I AM NOT DONE

fn main() {}

Expand Down
4 changes: 2 additions & 2 deletions exercises/tests/tests9.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
//
// You should NOT modify any existing code except for adding two lines of attributes.

// I AM NOT DONE

extern "Rust" {
fn my_demo_function(a: u32) -> u32;
#[link_name = "my_demo_function"]
fn my_demo_function_alias(a: u32) -> u32;
}

mod Foo {
// No `extern` equals `extern "Rust"`.
#[no_mangle]
fn my_demo_function(a: u32) -> u32 {
a
}
Expand Down

0 comments on commit 95af2ef

Please sign in to comment.