1. 16 11月, 2014 1 次提交
  2. 10 11月, 2014 1 次提交
  3. 07 11月, 2014 1 次提交
  4. 04 11月, 2014 1 次提交
    • A
      Clean-up transmutes in librustc · a87078a2
      Ariel Ben-Yehuda 提交于
      None of them would break by implementation-defined struct layout, but
      one would break with strict lifetime aliasing, and the rest are just
      ugly code.
      a87078a2
  5. 31 10月, 2014 2 次提交
    • J
      DSTify Hash · 1384a43d
      Jorge Aparicio 提交于
      - The signature of the `*_equiv` methods of `HashMap` and similar structures
      have changed, and now require one less level of indirection. Change your code
      from:
      
      ```
      hashmap.find_equiv(&"Hello");
      hashmap.find_equiv(&&[0u8, 1, 2]);
      ```
      
      to:
      
      ```
      hashmap.find_equiv("Hello");
      hashmap.find_equiv(&[0u8, 1, 2]);
      ```
      
      - The generic parameter `T` of the `Hasher::hash<T>` method have become
      `Sized?`. Downstream code must add `Sized?` to that method in their
      implementations. For example:
      
      ```
      impl Hasher<FnvState> for FnvHasher {
          fn hash<T: Hash<FnvState>>(&self, t: &T) -> u64 { /* .. */ }
      }
      ```
      
      must be changed to:
      
      ```
      impl Hasher<FnvState> for FnvHasher {
          fn hash<Sized? T: Hash<FnvState>>(&self, t: &T) -> u64 { /* .. */ }
          //      ^^^^^^
      }
      ```
      
      [breaking-change]
      1384a43d
    • A
      Test fixes and rebase conflicts · 6fcba882
      Alex Crichton 提交于
      6fcba882
  6. 30 10月, 2014 1 次提交
  7. 29 10月, 2014 1 次提交
    • S
      Rename fail! to panic! · 7828c3dd
      Steve Klabnik 提交于
      https://github.com/rust-lang/rfcs/pull/221
      
      The current terminology of "task failure" often causes problems when
      writing or speaking about code. You often want to talk about the
      possibility of an operation that returns a Result "failing", but cannot
      because of the ambiguity with task failure. Instead, you have to speak
      of "the failing case" or "when the operation does not succeed" or other
      circumlocutions.
      
      Likewise, we use a "Failure" header in rustdoc to describe when
      operations may fail the task, but it would often be helpful to separate
      out a section describing the "Err-producing" case.
      
      We have been steadily moving away from task failure and toward Result as
      an error-handling mechanism, so we should optimize our terminology
      accordingly: Result-producing functions should be easy to describe.
      
      To update your code, rename any call to `fail!` to `panic!` instead.
      Assuming you have not created your own macro named `panic!`, this
      will work on UNIX based systems:
      
          grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g'
      
      You can of course also do this by hand.
      
      [breaking-change]
      7828c3dd
  8. 28 10月, 2014 1 次提交
  9. 24 10月, 2014 1 次提交
  10. 20 10月, 2014 1 次提交
    • A
      Remove a large amount of deprecated functionality · 9d5d97b5
      Alex Crichton 提交于
      Spring cleaning is here! In the Fall! This commit removes quite a large amount
      of deprecated functionality from the standard libraries. I tried to ensure that
      only old deprecated functionality was removed.
      
      This is removing lots and lots of deprecated features, so this is a breaking
      change. Please consult the deprecation messages of the deleted code to see how
      to migrate code forward if it still needs migration.
      
      [breaking-change]
      9d5d97b5
  11. 15 10月, 2014 2 次提交
    • A
      rustc: Add deprecation/renaming support for lints · 31b7d64f
      Aaron Turon 提交于
      Since a large number of lints are being renamed for RFC 344, this commit
      adds some basic deprecation/renaming functionality to the pluggable lint
      system. It allows a simple mapping of old to new names, and can warn
      when old names are being used.
      
      This change needs to be rolled out in stages. In this commit, the
      deprecation warning is commented out, but the old name is forwarded to
      the new one.
      
      Once the commit lands and we have generated a new snapshot of the
      compiler, we can add the deprecation warning and rename all uses of the
      lints in the rust codebase.
      31b7d64f
    • A
      rustc: Rename lints per RFC 344 · aabb6e72
      Aaron Turon 提交于
      RFC 344 proposes a set of naming conventions for lints. This commit
      renames existing lints to follow the conventions.
      
      Use the following sed script to bring your code up to date:
      
      ```
      s/unnecessary_typecast/unused_typecasts/g
      s/unsigned_negate/unsigned_negation/g
      s/type_limits/unused_comparisons/g
      s/type_overflow/overflowing_literals/g
      s/ctypes/improper_ctypes/g
      s/owned_heap_memory/box_pointers/g
      s/unused_attribute/unused_attributes/g
      s/path_statement/path_statements/g
      s/unused_must_use/unused_must_use/g
      s/unused_result/unused_results/g
      s/non_uppercase_statics/non_upper_case_globals/g
      s/unnecessary_parens/unused_parens/g
      s/unnecessary_import_braces/unused_import_braces/g
      s/unused_unsafe/unused_unsafe/g
      s/unsafe_block/unsafe_blocks/g
      s/unused_mut/unused_mut/g
      s/unnecessary_allocation/unused_allocation/g
      s/missing_doc/missing_docs/g
      s/unused_imports/unused_imports/g
      s/unused_extern_crate/unused_extern_crates/g
      s/unnecessary_qualification/unused_qualifications/g
      s/unrecognized_lint/unknown_lints/g
      s/unused_variable/unused_variables/g
      s/dead_assignment/unused_assignments/g
      s/unknown_crate_type/unknown_crate_types/g
      s/variant_size_difference/variant_size_differences/g
      s/transmute_fat_ptr/fat_ptr_transmutes/g
      ```
      
      Closes #16545
      Closes #17932
      
      Due to deprecation, this is a:
      
      [breaking-change]
      aabb6e72
  12. 10 10月, 2014 1 次提交
  13. 03 10月, 2014 1 次提交
  14. 18 9月, 2014 1 次提交
  15. 17 9月, 2014 1 次提交
  16. 14 9月, 2014 1 次提交
  17. 12 9月, 2014 3 次提交
  18. 10 9月, 2014 1 次提交
  19. 08 9月, 2014 1 次提交
  20. 05 9月, 2014 1 次提交
  21. 30 8月, 2014 2 次提交
    • P
      Add lint groups; define built-in lint groups `bad_style` and `unused` · ed2aad8b
      P1start 提交于
      This adds support for lint groups to the compiler. Lint groups are a way of
      grouping a number of lints together under one name. For example, this also
      defines a default lint for naming conventions, named `bad_style`. Writing
      `#[allow(bad_style)]` is equivalent to writing
      `#[allow(non_camel_case_types, non_snake_case, non_uppercase_statics)]`. These
      lint groups can also be defined as a compiler plugin using the new
      `Registry::register_lint_group` method.
      
      This also adds two built-in lint groups, `bad_style` and `unused`. The contents
      of these groups can be seen by running `rustc -W help`.
      ed2aad8b
    • P
      Unify non-snake-case lints and non-uppercase statics lints · de7abd88
      P1start 提交于
      This unifies the `non_snake_case_functions` and `uppercase_variables` lints
      into one lint, `non_snake_case`. It also now checks for non-snake-case modules.
      This also extends the non-camel-case types lint to check type parameters, and
      merges the `non_uppercase_pattern_statics` lint into the
      `non_uppercase_statics` lint.
      
      Because the `uppercase_variables` lint is now part of the `non_snake_case`
      lint, all non-snake-case variables that start with lowercase characters (such
      as `fooBar`) will now trigger the `non_snake_case` lint.
      
      New code should be updated to use the new `non_snake_case` lint instead of the
      previous `non_snake_case_functions` and `uppercase_variables` lints. All use of
      the `non_uppercase_pattern_statics` should be replaced with the
      `non_uppercase_statics` lint. Any code that previously contained non-snake-case
      module or variable names should be updated to use snake case names or disable
      the `non_snake_case` lint. Any code with non-camel-case type parameters should
      be changed to use camel case or disable the `non_camel_case_types` lint.
      
      [breaking-change]
      de7abd88
  22. 29 8月, 2014 1 次提交
  23. 15 8月, 2014 1 次提交
    • P
      librustc: Stop assuming that implementations and traits only contain · 9907fa4a
      Patrick Walton 提交于
      methods.
      
      This paves the way to associated items by introducing an extra level of
      abstraction ("impl-or-trait item") between traits/implementations and
      methods. This new abstraction is encoded in the metadata and used
      throughout the compiler where appropriate.
      
      There are no functional changes; this is purely a refactoring.
      9907fa4a
  24. 07 8月, 2014 1 次提交
  25. 01 8月, 2014 1 次提交
    • P
      librustc: Forbid pattern bindings after `@`s, for memory safety. · 5b85c8cb
      Patrick Walton 提交于
      This is an alternative to upgrading the way rvalues are handled in the
      borrow check. Making rvalues handled more like lvalues in the borrow
      check caused numerous problems related to double mutable borrows and
      rvalue scopes. Rather than come up with more borrow check rules to try
      to solve these problems, I decided to just forbid pattern bindings after
      `@`. This affected fewer than 10 lines of code in the compiler and
      libraries.
      
      This breaks code like:
      
          match x {
              y @ z => { ... }
          }
      
          match a {
              b @ Some(c) => { ... }
          }
      
      Change this code to use nested `match` or `let` expressions. For
      example:
      
          match x {
              y => {
                  let z = y;
                  ...
              }
          }
      
          match a {
              Some(c) => {
                  let b = Some(c);
                  ...
              }
          }
      
      Closes #14587.
      
      [breaking-change]
      5b85c8cb
  26. 17 7月, 2014 1 次提交
  27. 09 7月, 2014 1 次提交
  28. 25 6月, 2014 8 次提交