Skip to content

Rust Plugin shows error which is compiled by rustc #8543

@rfaeseke

Description

@rfaeseke

Environment

  • IntelliJ Rust plugin version:
    0.4.166.4426-213-nightly
  • Rust toolchain version:
    nightly-x86_64-apple-darwin (override)
  • IDE name and version:
    IntelliJ IDEA 2021.3.1 (Ultimate Edition)
    Build #IU-213.6461.79, built on December 28, 2021
  • Operating system:
    macOS Big Sur

Problem description

When opening rxRust https://github.com/rxRust/rxRust project then in file
Bildschirmfoto 2022-02-11 um 01 52 12
subject.rs the code
...
fn emit_buffer<'a, O, B, Item, Err, T>(mut observer: O, b: &'a B)
where
O: DerefMut,
O::Target: Observer<Item = Item, Err = Err>,
B: RcDerefMut<Target<'a> = T> + 'a,
T: DerefMut<Target = Vec<ObserverTrigger<Item, Err>>>,
{
...
is marked with error "Function emit_buffer must have a body", but cargo build compiles the project without errors.
The problem seems to be caused by the line B: RcDerefMut<Target<'a> = T> + 'a, which uses the trait
....
pub trait RcDerefMut {
type Target<'a>
where
Self: 'a;
#[allow(clippy::needless_lifetimes)]
fn rc_deref_mut<'a>(&'a self) -> Self::Target<'a>;
}
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsubsystem::code insightGeneral label for issues related to code understanding: highlighting, completion, annotation, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions