1. 25 4月, 2018 3 次提交
  2. 24 4月, 2018 33 次提交
  3. 23 4月, 2018 4 次提交
    • R
      Don't allow #[should_panic] with non-() tests · 14e5e0e9
      Russell Cohen 提交于
      14e5e0e9
    • B
      Auto merge of #49372 - Phlosioneer:inherent-impl-default-error-message, r=nagisa · 4640615c
      bors 提交于
      Better error message when trying to write default impls
      
      Previously, if you tried to write this (using the specialization
      feature flag):
      
      default impl PartialEq<MyType> {
      ...
      }
      
      The compiler would give you the mysterious warning "inherent impls
      cannot be default". What it really means is that you're trying to
      write an impl for a Structure or *Trait Object*, and that cannot
      be "default". However, one of the ways to encounter this error
      (as shown by the above example) is when you forget to write "for
      MyType".
      
      This PR adds a help message that reads "maybe missing a `for`
      keyword?" This is useful, actionable advice that will help any user
      identify their mistake, and doesn't get in the way or mislead any
      user that really meant to use the "default" keyword for this weird
      purpose. In particular, this help message will be useful for any
      users who don't know the "inherent impl" terminology, and/or users
      who forget that inherent impls CAN be written for traits (they apply
      to the trait objects). Both of these are somewhat confusing, seldom-
      used concepts; a one-line error message without any error number for
      longer explanation is NOT the place to introduce these ideas.
      
      I wasn't quite sure what grammar / wording to use. I'm open to suggestions. CC @rust-lang/docs (I hope I'm doing that notation right)
      
      (Apparently not. :( )
      4640615c
    • O
      Fix the miri tool · 3084c066
      Oliver Schneider 提交于
      3084c066
    • N
      Use FxHashMap in syntax_pos::symbol::Interner::intern. · f7d4c976
      Nicholas Nethercote 提交于
      Because it's faster than HashMap.
      
      This change reduces the time taken for a few of the rustc-perf
      benchmarks, mostly the small ones, by up to 5%.
      f7d4c976