Skip to content

Adjust the error messages to match the pattern "expected foo, found bar" #8314

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

Closed
wants to merge 64 commits into from
Closed

Conversation

kud1ing
Copy link

@kud1ing kud1ing commented Aug 5, 2013

... which the coding style guide suggests.

Lenny222 and others added 30 commits August 5, 2013 22:09
Use unchecked vec indexing since the vector bounds are checked by the
loop. Iterators are not easy to use in this case since we skip 1-4 bytes
each lap. This part of the commit speeds up is_utf8 for ASCII input.

Check codepoint ranges by checking the byte ranges manually instead of
computing a full decoding for multibyte encodings. This is easy to read
and corresponds to the UTF-8 syntax in the RFC.

No changes to what we accept. A comment notes that surrogate halves are
accepted.

Before:

	test str::bench::is_utf8_100_ascii ... bench: 165 ns/iter (+/- 3)
	test str::bench::is_utf8_100_multibyte ... bench: 218 ns/iter (+/- 5)

After:
	test str::bench::is_utf8_100_ascii ... bench: 130 ns/iter (+/- 1)
	test str::bench::is_utf8_100_multibyte ... bench: 156 ns/iter (+/- 3)
multicast functions now take IpAddr (without port), because they dont't
need port.

Uv* types renamed:
* UvIpAddr -> UvSocketAddr
* UvIpv4 -> UvIpv4SocketAddr
* UvIpv6 -> UvIpv6SocketAddr

"Socket address" is a common name for (ip-address, port) pair (e.g. in
sockaddr_in struct).
I suspect that this is a race between process exit and the termination of
worker threads used by libuv (if I sleep before exit it doesn't leak). This
isn't going to cause any real problems but should probably be fixed at
some point.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
rvalues aren't going to be used anywhere but as the argument, so
there's no point in copying them. LLVM used to eliminate the copy
later, but why bother emitting it in the first place?
These are both obsoleted by the forthcoming new GC.
* LLVM now has a C interface to LLVMBuildAtomicRMW
* The exception handling support for the JIT seems to have been dropped
* Various interfaces have been added or headers have changed
At the same time create a more robust wrapper to try to prevent this type of
issue from cropping up in the future.
It was previously pushing the byte on top of the string's null
terminator. I added a test to make sure it doesn't break in the future.
Also fix some incorrect comments and variable names.
Otherwise interferes with the existing runtime
rustc needs *even more* megabytes when run without optimizations
Every time run_sched_once performs a 'scheduling action' it needs to guarantee
that it runs at least one more time, so enqueue another run_sched_once callback.
The primary reason it needs to do this is because not all async callbacks
are guaranteed to run, it's only guaranteed that *a* callback will run after
enqueing one - some may get dropped.

At the moment this means we wastefully create lots of callbacks to ensure that
there will *definitely* be a callback queued up to continue running the scheduler.
The logic really needs to be tightened up here.
This is no longer testable once newsched is turned on
Not compatible with newsched
msullivan and others added 21 commits August 6, 2013 22:18
- Made naming schemes consistent between Option, Result and Either
- Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None)
- Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
Let Option be a base for a widely useful one- or zero- item iterator.
Refactor OptionIterator to support any generic element type, so the same
iterator impl can be used for both &T, &mut T and T iterators.
convert iter() and iter_err() for Result. Use OptionIterator.
Implement clone, bidirectionality and random access for this iterator
Use the Repeat iterator to carry the "explicit closure capture" that was
previously done with the custom EnvFilterIterator.
With Option as the simplest container, `consume` is the way to turn it
into a by-value iterator.
ChunkIter .idx() didn't handle overflow correctly, even though it tried.
@kud1ing
Copy link
Author

kud1ing commented Aug 6, 2013

Sorry, that was a merge instead of a rebase. For now i am a lost in rebase-land.

@Seldaek
Copy link
Contributor

Seldaek commented Aug 7, 2013

@kud1ing your best bet at this point is to start over I think:

  • git checkout but_found
  • git fetch <mozilla/rust remote>
  • git reset --hard <mozilla/rust remote>/master
  • git cherry-pick 113cc0e # that's your initial commit
  • resolve the conflicts you'll have when applying
  • git add src/lib*
  • git commit

where <mozilla/rust remote> is origin, upstream or whatever you called the remote with this repo in.

@kud1ing
Copy link
Author

kud1ing commented Aug 7, 2013

@Seldaek: Thanks. A painful but important lesson.

@kud1ing
Copy link
Author

kud1ing commented Aug 7, 2013

I give up. LLVM patches could not be applied.

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.