mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Move inlay hints tests into implementation modules
This commit is contained in:
parent
191cfba9d2
commit
1c8bcf0d4e
9 changed files with 1844 additions and 1777 deletions
|
@ -37,3 +37,35 @@ pub(super) fn hints(
|
|||
|
||||
Some(())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::{
|
||||
inlay_hints::tests::{check_with_config, TEST_CONFIG},
|
||||
InlayHintsConfig, LifetimeElisionHints,
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn hints_lifetimes_static() {
|
||||
check_with_config(
|
||||
InlayHintsConfig {
|
||||
lifetime_elision_hints: LifetimeElisionHints::Always,
|
||||
..TEST_CONFIG
|
||||
},
|
||||
r#"
|
||||
trait Trait {}
|
||||
static S: &str = "";
|
||||
// ^'static
|
||||
const C: &str = "";
|
||||
// ^'static
|
||||
const C: &dyn Trait = panic!();
|
||||
// ^'static
|
||||
|
||||
impl () {
|
||||
const C: &str = "";
|
||||
const C: &dyn Trait = panic!();
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue