Skip to content

Commit

Permalink
Auto merge of #251 - DavidVonDerau:dvd/pub-bumpwrapper, r=Amanieu
Browse files Browse the repository at this point in the history
Add `pub` modifier to `BumpWrapper`.

Without this change, I'm seeing the following error when trying to use the `BumpWrapper` feature in my own code.

```
error[E0423]: cannot initialize a tuple struct which contains private fields
   |
   |             HashSet::new_in(BumpWrapper(arena))
   |                             ^^^^^^^^^^^ constructor is not visible here due to private fields
```

`arena` is of type `&Bump`, matching the example given in the `test_bumpalo` test: `HashMap::new_in(BumpWrapper(&bump));`.
  • Loading branch information
bors committed Mar 20, 2021
2 parents edeb8f7 + b29c892 commit 5fcb737
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ pub enum UnavailableMutError {
/// the `allocator-api` feature of the `bumpalo` crate.
#[cfg(feature = "bumpalo")]
#[derive(Clone, Copy, Debug)]
pub struct BumpWrapper<'a>(&'a bumpalo::Bump);
pub struct BumpWrapper<'a>(pub &'a bumpalo::Bump);

#[cfg(feature = "bumpalo")]
#[test]
Expand Down

0 comments on commit 5fcb737

Please sign in to comment.