1. 08 12月, 2017 1 次提交
  2. 26 10月, 2017 1 次提交
  3. 29 11月, 2016 1 次提交
  4. 01 9月, 2016 1 次提交
  5. 23 8月, 2016 1 次提交
  6. 01 5月, 2016 1 次提交
    • J
      Handle coercion casts properly when building the MIR · 3906aef5
      James Miller 提交于
      Coercion casts (`expr as T` where the type of `expr` can be coerced to
      `T`) are essentially no-ops, as the actual work is done by a coercion.
      Previously a check for type equality was used to avoid emitting the
      redundant cast in the MIR, but this failed for coercion casts of
      function items that had lifetime parameters. The MIR trans code doesn't
      handle `FnPtr -> FnPtr` casts and produced an error.
      
      Also fixes a bug with type ascription expressions not having any
      adjustments applied.
      
      Fixes #33295
      3906aef5
  7. 09 4月, 2016 1 次提交
  8. 09 1月, 2016 1 次提交
  9. 19 2月, 2015 1 次提交
    • B
      Fix an ICE when translating `if loop {} {}` · 07c0faa4
      Björn Steinbrink 提交于
      In `if loop {} {}`, the `if` is actually unreachable, but we didn't
      handle that correctly and when trying to translate the `if` we tried to
      branch on the "return value" of the loop expression, which is not an
      `i1` and therefore triggered an LLVM assertion.
      07c0faa4
  10. 17 2月, 2015 1 次提交
  11. 14 2月, 2015 1 次提交
    • N
      Add `#[rustc_error]` annotation, which causes trans to signal an error · fb05f282
      Niko Matsakis 提交于
      if found on the `main()` function. This lets you write tests that live
      in `compile-fail` but are expected to compile successfully. This is
      handy when you have many small variations on a theme that you want to
      keep together, and you are just testing the type checker, not the
      runtime semantics.
      fb05f282
  12. 08 1月, 2015 1 次提交
  13. 05 1月, 2015 1 次提交
  14. 02 1月, 2015 1 次提交
  15. 25 8月, 2014 1 次提交
    • A
      rustc: Encode the visibility of foreign items · 1c76d559
      Alex Crichton 提交于
      The privacy pass of the compiler was previously not taking into account the
      privacy of foreign items, or bindings to external functions. This commit fixes
      this oversight by encoding the visibility of foreign items into the metadata for
      each crate.
      
      Any code relying on this will start to fail to  compile and the bindings must be
      marked with `pub` to indicate that they can be used externally.
      
      Closes #16725
      [breaking-change]
      1c76d559
  16. 16 5月, 2014 1 次提交
    • F
      Unit tests for flowgraph pretty printing. · 3aad0e24
      Felix S. Klock II 提交于
      Each test works by rendering the flowgraph for the last identified
      block we see in expanded pretty-printed output, and comparing it (via
      `diff`) against a checked in "foo.dot-expected.dot" file.
      
      Each test post-processes the output to remove NodeIds ` (id=NUM)` so
      that the expected output is somewhat stable (or at least independent
      of how we assign NodeIds) and easier for a human to interpret when
      looking at the expected output file itself.
      
      ----
      
      Test writing style notes:
      
      I usually tried to write the tests in a way that would avoid duplicate
      labels in the output rendered flow graph, when possible.
      
      The tests that have string literals "unreachable" in the program text
      are deliberately written that way to remind the reader that the
      unreachable nodes in the resulting graph are not an error in the
      control flow computation, but rather a natural consequence of its
      construction.
      3aad0e24
  17. 07 4月, 2014 1 次提交
  18. 21 3月, 2014 2 次提交
  19. 08 2月, 2014 1 次提交
  20. 23 12月, 2013 1 次提交
  21. 13 12月, 2013 1 次提交
  22. 30 11月, 2013 1 次提交
    • A
      Add a new run-make test directory · 6d6ccb75
      Alex Crichton 提交于
      This infrastructure is meant to support runnings tests that involve various
      interesting interdependencies about the types of crates being linked or possibly
      interacting with C libraries. The goal of these make tests is to not restrict
      them to a particular test runner, but allow each test to run its own tests.
      
      To this end, there is a new src/test/run-make directory which has sub-folders of
      tests. Each test requires a `Makefile`, and running the tests constitues simply
      running `make` inside the directory. The new target is `check-stageN-rmake`.
      
      These tests will have the destination directory (as TMPDIR) and the local rust
      compiler (as RUSTC) passed along to them. There is also some helpful
      cross-platform utilities included in src/test/run-make/tools.mk to aid with
      compiling C programs and running them.
      
      The impetus for adding this new test suite is to allow various interesting forms
      of testing rust linkage. All of the tests initially added are various flavors of
      compiling Rust and C with one another as well as just making sure that rust
      linkage works in general.
      
      Closes #10434
      6d6ccb75