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

Making crate accessible from std #227

Merged
merged 2 commits into from Nov 6, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions Cargo.toml
Expand Up @@ -23,12 +23,17 @@ exclude = [
]
build = "build.rs"

[dependencies]
core = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-core' }
compiler_builtins = { version = '0.1.2', optional = true }

[badges]
travis-ci = { repository = "bitflags/bitflags" }

[features]
default = []
example_generated = []
rustc-dep-of-std = ["core", "compiler_builtins"]

[package.metadata.docs.rs]
features = [ "example_generated" ]
Expand Down
13 changes: 12 additions & 1 deletion test_suite/tests/compile-fail/private_flags.stderr
Expand Up @@ -2,4 +2,15 @@ error[E0603]: struct `Flags2` is private
--> $DIR/private_flags.rs:19:26
|
19 | let flag2 = example::Flags2::FLAG_B;
| ^^^^^^
| ^^^^^^ private struct
|
note: the struct `Flags2` is defined here
--> $DIR/private_flags.rs:10:5
|
10 | / bitflags! {
11 | | struct Flags2: u32 {
12 | | const FLAG_B = 0b00000010;
13 | | }
14 | | }
| |_____^
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)