- 16 11月, 2014 1 次提交
-
-
由 Steven Fackler 提交于
Struct variant field visibility is now inherited. Remove `pub` keywords from declarations. Closes #18641 [breaking-change]
-
- 10 11月, 2014 1 次提交
-
-
由 Ariel Ben-Yehuda 提交于
-
- 07 11月, 2014 1 次提交
-
-
由 Alexis Beingessner 提交于
-
- 04 11月, 2014 1 次提交
-
-
由 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.
-
- 31 10月, 2014 2 次提交
-
-
由 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]
-
由 Alex Crichton 提交于
-
- 30 10月, 2014 1 次提交
-
-
由 P1start 提交于
These lints are allow by default because they are sometimes too sensitive.
-
- 29 10月, 2014 1 次提交
-
-
由 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]
-
- 28 10月, 2014 1 次提交
-
-
由 Aaron Turon 提交于
-
- 24 10月, 2014 1 次提交
-
-
由 P1start 提交于
Closes #17792.
-
- 20 10月, 2014 1 次提交
-
-
由 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]
-
- 15 10月, 2014 2 次提交
-
-
由 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.
-
由 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]
-
- 10 10月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
-
- 03 10月, 2014 1 次提交
-
-
由 P1start 提交于
-
- 18 9月, 2014 1 次提交
-
-
由 Patrick Walton 提交于
The implementation essentially desugars during type collection and AST type conversion time into the parameter scheme we have now. Only fully qualified names--e.g. `<T as Foo>::Bar`--are supported.
-
- 17 9月, 2014 1 次提交
-
-
由 Aaron Turon 提交于
-
- 14 9月, 2014 1 次提交
-
-
由 Eduard Burtescu 提交于
-
- 12 9月, 2014 3 次提交
-
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-
由 Victor Berger 提交于
-
- 10 9月, 2014 1 次提交
-
-
由 OGINO Masanori 提交于
The lint checks any unnecessary braces around one imported item like `use std::num::{abs};`. Signed-off-by: NOGINO Masanori <masanori.ogino@gmail.com>
-
- 08 9月, 2014 1 次提交
-
-
由 Eduard Burtescu 提交于
-
- 05 9月, 2014 1 次提交
-
-
由 Piotr Czarnecki 提交于
-
- 30 8月, 2014 2 次提交
-
-
由 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`.
-
由 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]
-
- 29 8月, 2014 1 次提交
-
-
由 Aaron Turon 提交于
-
- 15 8月, 2014 1 次提交
-
-
由 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.
-
- 07 8月, 2014 1 次提交
-
-
由 Niko Matsakis 提交于
meaning `'b outlives 'a`. Syntax currently does nothing but is needed for full fix to #5763. To use this syntax, the issue_5763_bootstrap feature guard is required.
-
- 01 8月, 2014 1 次提交
-
-
由 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]
-
- 17 7月, 2014 1 次提交
-
-
由 Huon Wilson 提交于
This allows lint traversals to emit more information (when a lint is non-allow), or avoid doing expensive computations (when a lint is allow).
-
- 09 7月, 2014 1 次提交
-
-
由 Richo Healey 提交于
[breaking-change]
-
- 25 6月, 2014 8 次提交
-
-
由 Keegan McAllister 提交于
-
由 Keegan McAllister 提交于
-
由 Keegan McAllister 提交于
-
由 Keegan McAllister 提交于
-
由 Keegan McAllister 提交于
None of the builtin lints use this, and it's now available through the Context.
-
由 Keegan McAllister 提交于
-
由 Keegan McAllister 提交于
-
由 Keegan McAllister 提交于
-