Skip to content

Commit

Permalink
Merge pull request #227 from fortanix/raoul/rustc-dep-of-std
Browse files Browse the repository at this point in the history
Making crate accessible from std
  • Loading branch information
KodrAus committed Nov 6, 2020
2 parents 15e911c + 4a233f1 commit 080e9ed
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
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)

0 comments on commit 080e9ed

Please sign in to comment.