Improved the search by including a levenshtein distance calculation which enables the docs search function to be more forgiving for spelling mistakes
Updated the licensing information for the Levenshtein distance function
remove unused field CrateContext::uses_gc
Port Rust to DragonFlyBSD

Not included are two required patches:

* LLVM: segmented stack support for DragonFly [1]

* jemalloc: simple configure patches

[1]: http://reviews.llvm.org/D4705
Derive PartialOrd, Ord and Hash for bitflags types.

In order to prevent users from having to manually implement Hash and Ord for
bitflags types, this commit derives these traits automatically.

This breaks code that has manually implemented any of these traits for types
created by the bitflags! macro. Change this code by removing implementations
of these traits.

[breaking-change]
Implement Default for std::io::FilePermission
Deprecate the url crate.

The replacement is [rust-url](https://github.com/servo/rust-url),
which can be used with Cargo.

Fix #15874
Fix #10707
Close #10706
Close #10705
Close #8486
Fix trailing whitespace
Fix test suite for DragonFly
auto merge of #15385 : jroweboy/rust/master, r=brson

This enables the docs search function to be more forgiving for spelling mistakes. The algorithm works as a dynamic programming algorithm to detect the minimum number of changes required to the search parameter string in order to match any string in the search index. If the number of changes is less then a threshold (currently defined as 3), then the search parameter will be included as it is a possible misspelling of the word. Any results returned by the algorithm are sorted by distance and are ranked lower than results that are partial or exact matches (aka the matches returned by the original search algorithm). Additionally, the increment in the for loops in this file were using one of three different ways to increment (`i += 1` `i++` and `++i`) so I just standardized it to `++i`.

As an example, consider searching for the word `String` and accidentally typing in `Strnig`. The old system would return no results because it is a misspelling, but the Levenshtein distance between these two inputs is only two, which means that this will return `String` as a result. Additionally, it will return a few other results such as `strong`, and `StdRng` because these are also similar to `Strnig`. Because of the ranking system though, this change should be unobtrusive to anyone that spells the words correctly, as those are still ranked first before any Levenshtein results.
auto merge of #16074 : nham/rust/bitflags_traits, r=alexcrichton

I wanted to add an implementation of `Default` inside the bitflags macro, but `Default` isn't in the prelude, which means anyone who wants to use `bitflags!` needs to import it. This seems not nice, so I've just implemented for `FilePermission` instead.
auto merge of #16076 : SimonSapin/rust/deprecate-url, r=alexcrichton

The replacement is [rust-url](https://github.com/servo/rust-url), which can be used with Cargo.

Fix #15874
Fix #10707
Close #10706
Close #10705
Close #8486
auto merge of #16090 : epdtry/rust/doesnt-use-gc, r=alexcrichton
auto merge of #16073 : mneumann/rust/dragonfly2, r=alexcrichton

Not included are two required patches:

* LLVM: segmented stack support for DragonFly [1]

* jemalloc: simple configure patches

[1]: http://reviews.llvm.org/D4705
Support using custom sockets within the runtime.

This is akin to supporting custom file descriptors, but for sockets. This
allows for the implementation of raw sockets in an external library, as well as
integration with other libraries that use sockets such as zeromq.
Code clean-ups for custom socket support.

This fixes a number of issues discussed in the pull request.