create-rust-app: cargo fullstack fails due to errors compiling git-ref

After creating a new project using create-rust-app 9.0.0 running cargo fullstack results in build failures.

% cargo fullstack
   Compiling git-ref v0.22.0
   Compiling git-glob v0.5.4
   Compiling rustix v0.36.8
   Compiling async-channel v1.8.0
   Compiling aws-config v0.14.0
   Compiling diesel_migrations v2.0.0
   Compiling async-graphql v3.0.38
   Compiling actix-multipart v0.4.0
   Compiling actix-web-actors v4.2.0
   Compiling cargo_toml v0.14.1
   Compiling actix-web-httpauth v0.8.0
   Compiling Inflector v0.11.4
   Compiling dotenv v0.15.0
   Compiling voter_validator_2 v0.1.0 (/Users/rlperry/Clients/Lodestone/voter_validator_2)
error[E0554]: `#![feature]` may not be used on the stable release channel
  --> /Users/rlperry/.cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.8/src/lib.rs:99:26
   |
99 | #![cfg_attr(rustc_attrs, feature(rustc_attrs))]
   |                          ^^^^^^^^^^^^^^^^^^^^

error[E0282]: type annotations needed
   --> /Users/rlperry/.cargo/registry/src/github.com-1ecc6299db9ec823/git-glob-0.5.4/src/wildmatch.rs:248:62
    |
248 | ...                   let class = &pattern.as_ref()[p_idx + 2..closing_bracket_idx - 1];
    |                                            ^^^^^^
    |
help: try using a fully qualified path to specify the expected types
    |
248 |                                         let class = &<BStr as AsRef<T>>::as_ref(pattern)[p_idx + 2..closing_bracket_idx - 1];
    |                                                      +++++++++++++++++++++++++++       ~

For more information about this error, try `rustc --explain E0282`.
error: could not compile `git-glob` due to previous error
warning: build failed, waiting for other jobs to finish...
For more information about this error, try `rustc --explain E0554`.
error: could not compile `rustix` due to previous error
error[E0277]: the trait bound `BStr: AsRef<[_; 0]>` is not satisfied
  --> /Users/rlperry/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.22.0/src/store/packed/find.rs:95:35
   |
95 |                 .map(|(_rest, r)| r.name.as_bstr().as_ref())
   |                                   ^^^^^^^^^^^^^^^^ ------ required by a bound introduced by this call
   |                                   |
   |                                   the trait `AsRef<[_; 0]>` is not implemented for `BStr`
   |
   = help: the following other types implement trait `AsRef<T>`:
             <BStr as AsRef<BStr>>
             <BStr as AsRef<[u8]>>

error[E0277]: the trait bound `BStr: AsRef<[_; 0]>` is not satisfied
  --> /Users/rlperry/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.22.0/src/store/packed/find.rs:91:33
   |
91 |         a.binary_search_by_key(&full_name.as_ref(), |b: &u8| {
   |                                 ^^^^^^^^^ ------ required by a bound introduced by this call
   |                                 |
   |                                 the trait `AsRef<[_; 0]>` is not implemented for `BStr`
   |
   = help: the following other types implement trait `AsRef<T>`:
             <BStr as AsRef<BStr>>
             <BStr as AsRef<[u8]>>

error[E0283]: type annotations needed
    --> /Users/rlperry/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.22.0/src/fullname.rs:109:43
     |
109  |             if let Some(shortened) = name.strip_prefix(category.prefix().as_ref()) {
     |                                           ^^^^^^^^^^^^ -------------------------- type must be known at this point
     |                                           |
     |                                           cannot infer type of the type parameter `P` declared on the associated function `strip_prefix`
     |
     = note: cannot satisfy `_: core::slice::SlicePattern`
note: required by a bound in `core::slice::<impl [T]>::strip_prefix`
    --> /Users/rlperry/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2284:28
     |
2284 |     pub fn strip_prefix<P: SlicePattern<Item = T> + ?Sized>(&self, prefix: &P) -> Option<&[T]>
     |                            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `core::slice::<impl [T]>::strip_prefix`
help: consider specifying the generic argument
     |
109  |             if let Some(shortened) = name.strip_prefix::<P>(category.prefix().as_ref()) {
     |                                                       +++++

error[E0283]: type annotations needed
   --> /Users/rlperry/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.22.0/src/fullname.rs:109:43
    |
109 |             if let Some(shortened) = name.strip_prefix(category.prefix().as_ref()) {
    |                                           ^^^^^^^^^^^^                   ------ type must be known at this point
    |                                           |
    |                                           cannot infer type of the type parameter `P` declared on the associated function `strip_prefix`
    |
    = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
            - impl AsRef<BStr> for BStr;
            - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
    |
109 |             if let Some(shortened) = name.strip_prefix::<P>(category.prefix().as_ref()) {
    |                                                       +++++

error[E0283]: type annotations needed
   --> /Users/rlperry/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.22.0/src/fullname.rs:132:46
    |
132 |         } else if let Some(shortened) = name.strip_prefix(Category::MainPseudoRef.prefix().as_ref()) {
    |                                              ^^^^^^^^^^^^                                  ------ type must be known at this point
    |                                              |
    |                                              cannot infer type of the type parameter `P` declared on the associated function `strip_prefix`
    |
    = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
            - impl AsRef<BStr> for BStr;
            - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
    |
132 |         } else if let Some(shortened) = name.strip_prefix::<P>(Category::MainPseudoRef.prefix().as_ref()) {
    |                                                          +++++

error[E0283]: type annotations needed
   --> /Users/rlperry/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.22.0/src/fullname.rs:139:18
    |
139 |             name.strip_prefix(Category::LinkedPseudoRef { name: "".into() }.prefix().as_ref())
    |                  ^^^^^^^^^^^^                                                        ------ type must be known at this point
    |                  |
    |                  cannot infer type of the type parameter `P` declared on the associated function `strip_prefix`
    |
    = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
            - impl AsRef<BStr> for BStr;
            - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
    |
139 |             name.strip_prefix::<P>(Category::LinkedPseudoRef { name: "".into() }.prefix().as_ref())
    |                              +++++

error[E0283]: type annotations needed
    --> /Users/rlperry/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.22.0/src/raw.rs:76:18
     |
76   |                 .strip_prefix(namespace.0.as_bstr().as_ref())
     |                  ^^^^^^^^^^^^ ------------------------------ type must be known at this point
     |                  |
     |                  cannot infer type of the type parameter `P` declared on the associated function `strip_prefix`
     |
     = note: cannot satisfy `_: core::slice::SlicePattern`
note: required by a bound in `core::slice::<impl [T]>::strip_prefix`
    --> /Users/rlperry/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2284:28
     |
2284 |     pub fn strip_prefix<P: SlicePattern<Item = T> + ?Sized>(&self, prefix: &P) -> Option<&[T]>
     |                            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `core::slice::<impl [T]>::strip_prefix`
help: consider specifying the generic argument
     |
76   |                 .strip_prefix::<P>(namespace.0.as_bstr().as_ref())
     |                              +++++

error[E0283]: type annotations needed
  --> /Users/rlperry/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.22.0/src/raw.rs:76:18
   |
76 |                 .strip_prefix(namespace.0.as_bstr().as_ref())
   |                  ^^^^^^^^^^^^                       ------ type must be known at this point
   |                  |
   |                  cannot infer type of the type parameter `P` declared on the associated function `strip_prefix`
   |
   = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
           - impl AsRef<BStr> for BStr;
           - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
   |
76 |                 .strip_prefix::<P>(namespace.0.as_bstr().as_ref())
   |                              +++++

Some errors have detailed explanations: E0277, E0283.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `git-ref` due to 8 previous errors

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for looking into this @roblperry and for forwarding this to the watchexec repo. I’ve noticed someone else also came to the same conclusion here