Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch some std::oldmap to core::hashmap #5200

Closed
wants to merge 135 commits into from

Conversation

yjh0502
Copy link
Contributor

@yjh0502 yjh0502 commented Mar 2, 2013

Switch some std::oldmap::HashMap to core::hashmap::linear::LinearMap.
related to #4986

mitsuhiko and others added 30 commits February 18, 2013 22:48
These couldn't be overridden and so ended up being quite restrictive. This has
the side effect of changing the stringification of ~vecs, but nothing in
relied on this. Closes rust-lang#4869.
Copy the keyword list, and add `self` so that it is somewhat highlighted
(being liberal with the correct categories).
…phism

Closes rust-lang#4738.

The `std::smallintmap` module doesn't use an implicit @ box so I just added that explicitly for now to make porting simple.
…rson

Patch for rust-lang#4517

This works for fixed vectors, but I am unclear how slices should be printed, simply '&[...]'  or...

e.i. How should regions be printed?
Note on `struct_elt`: the comment is wrong, it actually dereferences the nth element of LLVM struct type if it is a pointer. That's why `T_ptr` is removed in `callee.rs`.
Copy the keyword list from rust.vim, and add `self` so that it is highlighted
(being liberal with the correct categories).

I'm not quite willing to dive in to clean up the emacs code yet, but at least this gets a (more) modern syntax highlighting list.
I also deleted a test that would be entirely useless without capture clauses.
catamorphism and others added 27 commits February 28, 2013 21:46
It was xfailed before the other commits in this pull request,
so no big deal. I'll look into it later.
…amorphism

* Disallow structural records everywhere
* Remove all #[cfg(stage0)] stuff
* Remove the last deprecated modes in libcore
* Un-xfail a test
core: Address XXX, make static constants for strings used when stringify...
Doesn't touch non-comment lines. This changes various type_names to TypeNames
and fixes the example for `tcp::accept` that was still using the old
`match` syntax and `{|args| ...}` closures.
The "Generic functions" subsection mentions that generic functions are
instantiated based on context, so let's also mention right away (with a
link to the #paths section) that an explicit form is available.

This also adds an example to the function call expression section that
explicitly instantiates a generic function.
Also, rename the OptVec-to-vector conversion method to
opt_vec::take_vec() and convert from a method into a fn
because I fear strange bugs.
- Removed space between struct name and parentheses
- Fixed indentation of the rest of the file (missing end)
- Don't print parentheses for structs with no fields
- Added test
r?

This probably isn't controversial, but I want somebody else to sign off on it.
This changes various type_names to TypeNames and fixes the example for `tcp::accept` that was still using the old `match` syntax and `{|args| ...}` closures.

The `accept` example was fairly outdated. I was just going to stay away from all the IO things until the scheduler revamp lands, but `accept` is probably one of the obvious starting points for networking stuff for a learner, and I don't want to get in the way of anyone's enthusiasm.

Doesn't touch non-comment lines, so I hope I will get away without learning about unit tests. It doesn't seem like the test system is set up to extract tests from doc comments right now.
I'm wary of editing the offical-looking things like the contribution policy, but I hope fixing typos/the sentence structure is okay.
…morphism

This adds a few words about unit-like struct types (`struct Foo;`) in the sections for `struct` items, structure expressions and structure types (and fixes an adjacent typo or two). The added text is at the same time triply redundant because of how the sections are split and rather brief because I don't think there's that much to say about field-less structs without digressing into `impl`s and generic functions and whatnot, but it's probably better than nothing for a start.

The added arm for the grammar of struct expressions is really awkward. It's just

    | expr_path

which is clearly not unambiguously a struct expression, but it didn't feel right not to add anything to the grammar chunk (and I can't tell whether the arm for enum-like structs is somehow unambiguous with regular enum expressions, either). Is this okay?
…atamorphism

I have seen a few people confused on how to explicitly instantiate generic functions, since the syntax differs from C++'s and C#'s, which is probably where most people asking questions about generic functions are coming from. The only use of the `::<T>` syntax in the reference right now is in the section on paths, which is possibly not where someone trying to find out about generic functions is going to start looking. The tutorial doesn't mention it at all, but I think it's all right to make the reference a tiny bit more redundant and avoid stuffing the tutorial with syntax details.

----

The "Generic functions" subsection mentions that generic functions are instantiated based on context, so let's also mention right away (with a link to the #paths section) that an explicit form is available.

This also adds an example that explicitly instantiates a generic function to the function call expression section.
Moving them out of the way so the new scheduler code can occupy core::rt.
…phism

- Removed space between struct name and parentheses
- Fixed indentation of the rest of the file (missing end)
- Don't print parentheses for structs with no fields
- Added test
@yjh0502
Copy link
Contributor Author

yjh0502 commented Mar 2, 2013

Sorry, I accidentally send PR to master branch :(

@yjh0502 yjh0502 closed this Mar 2, 2013
bors added a commit to rust-lang-ci/rust that referenced this pull request May 2, 2020
…lip1995

Move unneeded_field_pattern to restriction group

Fixes rust-lang#1741

changelog: Move unneeded_field_pattern to pedantic group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.