1352222 发表于 2015-10-7 14:28:25

Rust 1.3 发布,新的子字符串匹配算法

欢迎加入运维网交流群:263444886  
  Rust 1.3 发布,该版本最显著的变化是 announcement API 的稳定性及性能的提升。此外,还有新的子字符串匹配算法,一个快速的 zero-filling 方法用于初始化和调整向量,提升了 Read::read_to_end 函数的速度(via lwn.net)  。
  Rust 1.3 发行日志的更新列表如下:
值得关注的改进

[*]  The new object lifetime defaults have been turnedon after a cycle of warnings about the change. Now typeslike &'a Box (or &'a Rc, etc) will change frombeing interpreted as &'a Box to &'aBox.
[*]  The Rustonomicon is a new book in the official documentationthat dives into writing unsafe Rust.
[*]  The Duration API, has been stabilized. This basic unit oftimekeeping is employed by other std APIs, as well as out-of-treetime crates.
重大改进

[*]  The new object lifetime defaults have been turnedon after a cycle of warnings about the change.
[*]  There is a known regression in how object lifetime elision isinterpreted, the proper solution for which is undetermined.
[*]  The # attribute, an internal implementationdetail, was accidentally stabilized previously. It has been putbehind the prelude_import feature gate. This change isbelieved to break no existing code.
[*]
  The behavior of size_of_val and align_of_val ismore sane for dynamically>
[*]  The dropck rules, which checks that destructors can't accessdestroyed values, have been updated to match theRFC. This fixes some soundness holes, and as such willcause some previously-compiling code to no longer build.
语言改进

[*]  The new object lifetime defaults have been turnedon after a cycle of warnings about the change.
[*]  Semicolons may now follow types and paths inmacros.
[*]
  The behavior of size_of_val and align_of_val ismore sane for dynamically>
[*]  'static variables may now be recursive.
[*]  ref bindings choose between Deref and DerefMutimplementations correctly.
[*]  The dropck rules, which checks that destructors can't accessdestroyed values, have been updated to match theRFC.


[*]  The Duration API, has been stabilized, as well as thestd::time module, which presently contains only Duration.
[*]  Box and Box both implement Clone.
[*]  The owned C string, CString, implements Borrow and theborrowed C string, CStr, implements ToOwned. The two ofthese allow C strings to be borrowed and cloned in generic code.
[*]  CStr implements Debug.
[*]  AtomicPtr implements Debug.
[*]  Error trait objects can be downcast to their concrete typesin many common configurations, using the is, downcast,downcast_ref and downcast_mut methods, similarly to theAny trait.
[*]  Searching for substrings now employs the two-way algorithminstead of doing a naive search. This gives major speedups to anumber of methods, including contains, find,rfind, split. starts_with andends_with are also faster.
[*]  The performance of PartialEq for slices is much faster.
[*]  The Hash trait offers the default method, hash_slice, whichis overridden and optimized by the implementations for scalars.
[*]  The Hasher trait now has a number of specialized write_*methods for primitive types, for efficiency.
[*]  The I/O-specific error type, std::io::Error, gained a set ofmethods for accessing the 'inner error', if any: get_ref,get_mut, into_inner. As well, the implementationof std::error::Error::cause also delegates to the innererror.
[*]
  process::Child gained the id method, which returns au32 representing the platform-specific process>
[*]  The connect method on slices is deprecated, replaced by the newjoin method (note that both of these are on the unstableSliceConcatExt trait, but through the magic of the prelude areavailable to stable code anyway).
[*]  The Div operator is implemented for Wrapping types.
[*]  DerefMut is implemented for String.
[*]  Performance of SipHash (the default hasher for HashMap) isbetter for long data.
[*]  AtomicPtr implements Send.
[*]  The read_to_end implementations for Stdin and Fileare now specialized to use uninitalized buffers for increasedperformance.
[*]  Lifetime parameters of foreign functions are now resolvedproperly.
Misc

[*]  Rust can now, with some coercion, produce programs that run onWindows XP, though XP is not considered a supported platform.
[*]  Porting Rust on Windows from the GNU toolchain to MSVC continues(1, 2, 3, 4). It is still notrecommended for use in 1.3, though should be fully-functionalin the 64-bit 1.4 beta.
[*]  On Fedora-based systems installation will properly configure thedynamic linker.
[*]  The compiler gained many new extended error descriptions, which canbe accessed with the --explain flag.
[*]  The dropck pass, which checks that destructors can't accessdestroyed values, has been rewritten. This fixes somesoundness holes, and as such will cause some previously-compilingcode to no longer build.
[*]  rustc now uses LLVM to write archive files where possible.Eventually this will eliminate the compiler's dependency on the arutility.
[*]  Rust has preliminary support for i686 FreeBSD (it has longsupported FreeBSD on x86_64).
[*]  The unused_mut, unconditional_recursion,improper_ctypes, and negate_unsigned lints aremore strict.
[*]  If landing pads are disabled (with -Z no-landing-pads), panic!will kill the process instead of leaking.
  更多内容可查看:Rust-1.3。
  Rust 是 Mozilla 的一个新的编程语言,由web语言的领军人物Brendan Eich(js之父),Dave Herman以及Mozilla公司的Graydon Hoare 合力开发。
页: [1]
查看完整版本: Rust 1.3 发布,新的子字符串匹配算法