aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_diagnostics
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-06-14 20:55:05 +0100
committerAleksey Kladov <[email protected]>2021-06-15 09:46:47 +0100
commit3f4ad44082abe7256825f6fc692c1455a1eb28bb (patch)
tree2cd099af0420486014a40d730ac492a6686418b7 /crates/ide_diagnostics
parentc2015e7d182f3cb2cebe686127dd6a3e683df9e6 (diff)
internal: document that we don't #[ignore] tests
Diffstat (limited to 'crates/ide_diagnostics')
-rw-r--r--crates/ide_diagnostics/src/handlers/incorrect_case.rs38
1 files changed, 9 insertions, 29 deletions
diff --git a/crates/ide_diagnostics/src/handlers/incorrect_case.rs b/crates/ide_diagnostics/src/handlers/incorrect_case.rs
index 72f251961..68f25f284 100644
--- a/crates/ide_diagnostics/src/handlers/incorrect_case.rs
+++ b/crates/ide_diagnostics/src/handlers/incorrect_case.rs
@@ -341,43 +341,27 @@ mod F {
341 } 341 }
342 342
343 #[test] 343 #[test]
344 #[ignore] 344 fn complex_ignore() {
345 fn bug_trait_inside_fn() { 345 // FIXME: this should trigger errors for the second case.
346 // FIXME:
347 // This is broken, and in fact, should not even be looked at by this
348 // lint in the first place. There's weird stuff going on in the
349 // collection phase.
350 // It's currently being brought in by:
351 // * validate_func on `a` recursing into modules
352 // * then it finds the trait and then the function while iterating
353 // through modules
354 // * then validate_func is called on Dirty
355 // * ... which then proceeds to look at some unknown module taking no
356 // attrs from either the impl or the fn a, and then finally to the root
357 // module
358 //
359 // It should find the attribute on the trait, but it *doesn't even see
360 // the trait* as far as I can tell.
361
362 check_diagnostics( 346 check_diagnostics(
363 r#" 347 r#"
364trait T { fn a(); } 348trait T { fn a(); }
365struct U {} 349struct U {}
366impl T for U { 350impl T for U {
367 fn a() { 351 fn a() {
368 // this comes out of bitflags, mostly
369 #[allow(non_snake_case)] 352 #[allow(non_snake_case)]
370 trait __BitFlags { 353 trait __BitFlagsOk {
371 const HiImAlsoBad: u8 = 2; 354 const HiImAlsoBad: u8 = 2;
372 #[inline] 355 fn Dirty(&self) -> bool { false }
373 fn Dirty(&self) -> bool {
374 false
375 }
376 } 356 }
377 357
358 trait __BitFlagsBad {
359 const HiImAlsoBad: u8 = 2;
360 fn Dirty(&self) -> bool { false }
361 }
378 } 362 }
379} 363}
380 "#, 364"#,
381 ); 365 );
382 } 366 }
383 367
@@ -414,18 +398,14 @@ extern {
414 } 398 }
415 399
416 #[test] 400 #[test]
417 #[ignore]
418 fn bug_traits_arent_checked() { 401 fn bug_traits_arent_checked() {
419 // FIXME: Traits and functions in traits aren't currently checked by 402 // FIXME: Traits and functions in traits aren't currently checked by
420 // r-a, even though rustc will complain about them. 403 // r-a, even though rustc will complain about them.
421 check_diagnostics( 404 check_diagnostics(
422 r#" 405 r#"
423trait BAD_TRAIT { 406trait BAD_TRAIT {
424 // ^^^^^^^^^ 💡 weak: Trait `BAD_TRAIT` should have CamelCase name, e.g. `BadTrait`
425 fn BAD_FUNCTION(); 407 fn BAD_FUNCTION();
426 // ^^^^^^^^^^^^ 💡 weak: Function `BAD_FUNCTION` should have snake_case name, e.g. `bad_function`
427 fn BadFunction(); 408 fn BadFunction();
428 // ^^^^^^^^^^^^ 💡 weak: Function `BadFunction` should have snake_case name, e.g. `bad_function`
429} 409}
430 "#, 410 "#,
431 ); 411 );