1. 03 1月, 2020 2 次提交
    • Y
      Rollup merge of #67595 - ohadravid:impl-trait-does-not-live-long-enough, r=estebank · 76c1454d
      Yuki Okushi 提交于
      Suggest adding a lifetime constraint for opaque type
      
      Fixes #67577, where code like this:
      
      ```
      struct List {
        data: Vec<String>,
      }
      impl List {
        fn started_with<'a>(&'a self, prefix: &'a str) -> impl Iterator<Item=&'a str> {
          self.data.iter().filter(|s| s.starts_with(prefix)).map(|s| s.as_ref())
        }
      }
      ```
      
      will show this error:
      ```
         Compiling playground v0.0.1 (/playground)
      error[E0597]: `prefix` does not live long enough
       --> src/lib.rs:6:47
        |
      5 |   fn started_with<'a>(&'a self, prefix: &'a str) -> impl Iterator<Item=&'a str> {
        |                   -- lifetime `'a` defined here     --------------------------- opaque type requires that `prefix` is borrowed for `'a`
      ...
      ```
      
      but without suggesting the lovely `help: you can add a constraint..`.
      
      r? @estebank
      76c1454d
    • Y
      Rollup merge of #67450 - michaelwoerister:bootstrap-import-limit, r=Mark-Simulacrum · 7c404ce2
      Yuki Okushi 提交于
      Allow for setting a ThinLTO import limit during bootstrap
      
      The benchmarks in https://github.com/rust-lang/rust/pull/66625 have shown that a lower ThinLTO import limit can be a net win for bootstrap times. This PR:
      - exposes the setting to `config.toml`,
      - defaults to a lower limit if `incremental = true` in `config.toml`, and
      - sets a lower limit for `x86_64-gnu-llvm-7` CI image in order to make the jobs complete more quickly (which remains to be tested).
      
      This setting will affect how the compiler and it's tools are compiled. It will not affect the settings the compiler uses when compiling user code.
      
      r? @pietroalbini
      cc @rust-lang/infra
      7c404ce2
  2. 02 1月, 2020 11 次提交
  3. 01 1月, 2020 20 次提交
  4. 31 12月, 2019 7 次提交