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

Explicitly allow unused crate dependencies and missing docs #161

Merged
merged 3 commits into from
Apr 4, 2022
Merged

Explicitly allow unused crate dependencies and missing docs #161

merged 3 commits into from
Apr 4, 2022

Conversation

bearcage
Copy link
Contributor

@bearcage bearcage commented Apr 4, 2022

Without this annotation, the main file generated by trybuild will always raise a warning/error on the respective setting for these compiler lints.

Explicitly allowing it here should have the net result of letting tests written using trybuild handle just like any other test in an environment with that lint set, and otherwise not make a difference.

Without this annotation the main file generated by trybuild
will always raise a warning/error on the respective setting
for the unused_crate_dependencies compiler lint.

Explicitly allowing it here should have the net result of
letting tests written using trybuild handle just like any
other test in an environment with that lint set.
@bearcage
Copy link
Contributor Author

bearcage commented Apr 4, 2022

Looks like on old versions of rust there's a smaller limit on how long an array of u8 can be while still impling write -- I tacked a to_vec on there to work around it (although adding an & would probably have worked too, now that I'm thinking about it).

@bearcage
Copy link
Contributor Author

bearcage commented Apr 4, 2022

Aaah, unknown lint on 1.36. Guess I need to install it so I can check this locally - just a sec

@bearcage
Copy link
Contributor Author

bearcage commented Apr 4, 2022

Github action sets -Dwarnings.

Allowing unknown lints (latest commit):

bearcage@site16:~/work/trybuild$ RUSTFLAGS=-Dwarnings cargo +1.36 test --all 2>/dev/null

running 12 tests
test path::test_path_macro ... ok
test normalize::tests::test_dir_backslash ... ok
test normalize::tests::test_basic ... ok
test normalize::tests::test_pyo3_url ... ok
test normalize::tests::test_dropshot_required_by ... ok
test normalize::tests::test_cargo_registry ... ok
test normalize::tests::test_proc_macro_panic ... ok
test normalize::tests::test_uniffi_out_dir ... ok
test normalize::tests::test_type_dir_backslash ... ok
test normalize::tests::test_strip_path_dependencies ... ok
test normalize::tests::test_rust_lib ... ok
test normalize::tests::test_traits_must_be_implemented ... ok

test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out


running 1 test
test test ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out


running 2 tests
test src/lib.rs -  (line 33) ... ok
test src/lib.rs -  (line 80) ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Thanks!

@dtolnay dtolnay merged commit dc77471 into dtolnay:master Apr 4, 2022
@bearcage bearcage deleted the unused-deps-synthetic-main branch April 4, 2022 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants