aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_diagnostics/src/handlers
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-15 09:48:15 +0100
committerGitHub <[email protected]>2021-06-15 09:48:15 +0100
commitfa4c851619f245b2fdd2bf9b135d5ecf5efb4bc7 (patch)
tree6543766c6134b5cbca4b0da48a2e09c32714a340 /crates/ide_diagnostics/src/handlers
parent7d363755a27f3bc89a5c7f5d15c8664299436bb4 (diff)
parent3f4ad44082abe7256825f6fc692c1455a1eb28bb (diff)
Merge #9278
9278: internal: document that we don't #[ignore] tests r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide_diagnostics/src/handlers')
-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 );