Skip to content

Failed to build with rustc 1.22.0-nightly (14039a42a 2017-09-22) #2080

Closed
@Frederick888

Description

@Frederick888

Due to: rust-lang/rust#44691

Logs:

error[E0308]: mismatched types
   --> clippy_lints/src/lifetimes.rs:116:38
    |
116 |                     if bound.name != "'static" && !bound.is_elided() {
    |                                      ^^^^^^^^^ expected enum `rustc::hir::LifetimeName`, found reference
    |
    = note: expected type `rustc::hir::LifetimeName`
               found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/lifetimes.rs:228:45
    |
228 |             allowed_lts.insert(RefLt::Named(lt.lifetime.name));
    |                                             ^^^^^^^^^^^^^^^^ expected struct `syntax_pos::symbol::Symbol`, found enum `rustc::hir::LifetimeName`
    |
    = note: expected type `syntax_pos::symbol::Symbol`
               found type `rustc::hir::LifetimeName`
    = help: here are some functions which might fulfill your needs:
            - .name()

error[E0308]: mismatched types
   --> clippy_lints/src/lifetimes.rs:238:23
    |
238 |         if lt.name != "'static" {
    |                       ^^^^^^^^^ expected enum `rustc::hir::LifetimeName`, found reference
    |
    = note: expected type `rustc::hir::LifetimeName`
               found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/lifetimes.rs:239:35
    |
239 |             vec.push(RefLt::Named(lt.name));
    |                                   ^^^^^^^ expected struct `syntax_pos::symbol::Symbol`, found enum `rustc::hir::LifetimeName`
    |
    = note: expected type `syntax_pos::symbol::Symbol`
               found type `rustc::hir::LifetimeName`
    = help: here are some functions which might fulfill your needs:
            - .name()

error[E0308]: mismatched types
   --> clippy_lints/src/lifetimes.rs:269:27
    |
269 |             if lt.name == "'static" {
    |                           ^^^^^^^^^ expected enum `rustc::hir::LifetimeName`, found reference
    |
    = note: expected type `rustc::hir::LifetimeName`
               found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/lifetimes.rs:274:44
    |
274 |                 self.lts.push(RefLt::Named(lt.name));
    |                                            ^^^^^^^ expected struct `syntax_pos::symbol::Symbol`, found enum `rustc::hir::LifetimeName`
    |
    = note: expected type `syntax_pos::symbol::Symbol`
               found type `rustc::hir::LifetimeName`
    = help: here are some functions which might fulfill your needs:
            - .name()

error[E0308]: mismatched types
   --> clippy_lints/src/lifetimes.rs:399:25
    |
399 |         self.map.remove(&lifetime.name);
    |                         ^^^^^^^^^^^^^^ expected struct `syntax_pos::symbol::Symbol`, found enum `rustc::hir::LifetimeName`
    |
    = note: expected type `&syntax_pos::symbol::Symbol`
               found type `&rustc::hir::LifetimeName`

error[E0277]: the trait bound `std::collections::HashMap<syntax_pos::symbol::Symbol, syntax_pos::Span>: std::iter::FromIterator<(rustc::hir::LifetimeName, syntax_pos::Span)>` is not satisfied
   --> clippy_lints/src/lifetimes.rs:419:10
    |
419 |         .collect();
    |          ^^^^^^^ a collection of type `std::collections::HashMap<syntax_pos::symbol::Symbol, syntax_pos::Span>` cannot be built from an iterator over elements of type `(rustc::hir::LifetimeName, syntax_pos::Span)`
    |
    = help: the trait `std::iter::FromIterator<(rustc::hir::LifetimeName, syntax_pos::Span)>` is not implemented for `std::collections::HashMap<syntax_pos::symbol::Symbol, syntax_pos::Span>`

error[E0308]: mismatched types
   --> clippy_lints/src/lifetimes.rs:437:29
    |
437 |         if lifetime.name != keywords::Invalid.name() && lifetime.name != "'static" {
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^
    |                             |
    |                             expected enum `rustc::hir::LifetimeName`, found struct `syntax_pos::symbol::Symbol`
    |                             help: try using a variant of the expected type: `rustc::hir::LifetimeName::Name(keywords::Invalid.name())`
    |
    = note: expected type `rustc::hir::LifetimeName`
               found type `syntax_pos::symbol::Symbol`

error[E0308]: mismatched types
   --> clippy_lints/src/lifetimes.rs:437:74
    |
437 |         if lifetime.name != keywords::Invalid.name() && lifetime.name != "'static" {
    |                                                                          ^^^^^^^^^ expected enum `rustc::hir::LifetimeName`, found reference
    |
    = note: expected type `rustc::hir::LifetimeName`
               found type `&'static str`

error[E0599]: no method named `as_str` found for type `rustc::hir::LifetimeName` in the current scope
   --> clippy_lints/src/types.rs:226:52
    |
226 |                             format!("{} ", lt.name.as_str())
    |                                                    ^^^^^^

error: aborting due to 11 previous errors

error: Could not compile `clippy_lints`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `clippy v0.0.162 (file:///home/frederick/Programming/Rust/rust-clippy)`, intermediate artifacts can be found at `/home/frederick/Programming/Rust/rust-clippy/target`

Caused by:
  build failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions