-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Single-element vec / str append. #44
Comments
Is there any way at the moment to convert a char or sequence of u8s to a str? Without that, which this bug or an explicit cast would provide, string manipulation becomes pretty hard. For the u8->str conversion, we'll probably want an is_valid_utf8 constraint. |
Support single-element append on vec, str. Closed by ddd8fee. |
Closed by ddd8fee. |
This makes `FnMut` require `FnOnce` and `Fn` require `FnMut`. Therefore, this change breaks code that implements the `FnMut` and/or `Fn` traits directly, without also implementing their dependencies. A simple forwarding implementation that defines `FnOnce` in terms of `FnMut` and/or `Fn` in terms of `FnMut` will suffice. This does not affect code that simply uses the `|&:|`/`|&mut:|`/`|:|` unboxed closure construction notation. Part of RFC rust-lang#44; needed to implement RFC rust-lang#63. Part of issue rust-lang#12831. [breaking-change]
Add a whole mess more android constants
Add AVX2 instruction assertiosn
Add details about integer overflow
Can't install Cloudflare Wrangler on Ubuntu. |
44: Make `Gc<T>` require bounds `T: Send + Sync` r=ltratt a=jacob-hughes The collector finalizes objects off the main thread. This means that if any fields are accessed via T's drop method, it must be done in a thread-safe way. A common pattern is to allow the `Gc<T>` to hold trait objects. For this change to work, TO methods need a `where Self: Send + Sync` clause for the compiler to guarantee object safety. Such clauses are deprecated in rustc because they can be used to create UB when binding to user traits with methods. However, at the time of this commit it's the only known way to add additional bounds for auto traits. From my understanding this usage is considered safe until a better situation arises [1]. [1]: rust-lang#50781 (comment) Co-authored-by: Jake Hughes <[email protected]>
This might involve digging in the typechecker a bit; it'd be good for these to
work:
let vec[T] v = ...;
let T t = ...;
v += t;
and
let str s = "hi";
s += 'x';
At the moment both the typechecker and the backend prefer to think of operator
just an exceptional case that might be good to provide support for.
For the time being we can fake it using a single-element temporary vec or a
single-char string. It's just kinda lame. But this is a lower-priority bug.
The text was updated successfully, but these errors were encountered: